How To : Setting up Logging

Back to Concepts and HOW TOs

Contents

[edit] Description

This document describes how to set up logging in Bungee Builder.

[edit] Prerequisites

Understanding Logging
Overview : Building a Bungee-powered Application
Introduction to Bungee Builder
Adding a Class to a Project
Adding a Function to a Class
Working with Bungee Logic

[edit] Procedure

To implement logging in your application:

  1. Open a code view of your class or function (double-click on the class or function).
  2. From the Toolbox, drag log message into your code where you would like to enable logging.
  3. In the Property Editor, set the properties:
    1. Comment Out Select this option if you want to comment out the logging statement.
    2. Type Select either Dialog, Log, or Both.
      1. Dialog Opens a dialog box during runtime.
      2. Log Creates a log entry (default). When Log is selected, a checkbox for Throw Event is available. Select Throw Event to have the log entry appear in the Event Viewer.
      3. Both Opens a dialog box and creates a log entry.
    3.  Dialog Type Select between Message, Confirmation, and Prompt.
      1. Message Displays the message (that's assigned in the Message property) along with an OK button (for closing the dialog box).
      2. Confirmation Displays the message (that's assigned in the Message property) along with OK and Cancel buttons.
      3. Prompt Displays the message (that's assigned in the Message property) along with a TextEdit field (for typing a note) and OK and Cancel buttons.
    4. Log Type Lets you assign a severity to the log message. Select between (the icons are used in the Event Viewer to help identify the type of message):
      1. Debug 
      2. Information
      3. Warning
      4. Error 
      5. Fatal 
    5. Message Lets you assign an object to act as a message that's displayed when Dialog is selected as the Type (see above). For example, you can use the Message property to display the value of a field. If you set Message to Expression and add something like: "This is the firstName field: " + firstName, the log entry will show the text in quotes and the value of firstName.
    6. Confirmation Lets you assign an object to act as a confirmation. This is used when Confirmation is selected as the Dialog Type (see above).
    7. Prompt Lets you assign an object to act as a prompt. This is used when Prompt is selected as the Dialog Type (see above).

[edit] Error Handling

 

[edit] Examples

 

[edit] Next Steps

Posting Your Application
Deploying Your Application
Managing a Deployed Application

[edit] Tags


Log in if you would like to rate this page.
    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.