log4fm

log4fm implements log4j style logging for FileMaker databases.

Description

With the addition of the script debugger in recent versions of FileMaker debugging scripts is now significantly easier than it once was, however, there are still occasions when it is either not possible to use the debugger or when logging a message is more appropriate (scripts running under FileMaker Server cannot be viewed in the debugger nor is it always possible to be at a user's computer to debug a problem).

Version: 1.0.1 [ Download ]
Date: August 16, 2010

Log4fm screen shot

Usage

log4fm is designed as a module that can be easily used with existing databases. To get started copy the custom function "Logger.Parameter" into the database and add log4fm as an "External Data Source".

To log a message, first set the log level using one of scripts

Only messages with a level equal to or higher than the log level are logged. So, for example, when the log level is set to "Warn", messages with a level of "Info", "Debug" or "Trace" are ignored. To disable logging call the script "Logger.Disabled".

To write a message to log call one of

with a script parameter of

Logger.Parameter ( <message to log> )

The log messages can then be viewed in the log4fm database.

Note: when logging a message with "Logger.Fatal" Halt Script is called.

Security Note

The script that logs the messages runs with full access: there are Accounts to allowing logging without any further access to the database and for an operator to view messages. By default log4fm automatically logs in using the minimal access logging account: to gain full access use the "Login" button at the lower-right of the window and log in as "Admin" (there's no password).

Requirements

(Earlier versions may work but have not been tested.)

Feedback, Suggestions & Bug Reports

Please send any feedback, suggestions or bug reports via the Contact form. If you have a suggestion for how this might be improved I'd be very interested in hearing it.

License

Copyright (c) 2010, Mark Banks
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Contact | FileMaker | Home

© 2010 Mark Banks. Last modified: August 16, 2010