|Mac & Win
Starts logging all plugin calls to a text file.
|The native file path to the log file.
|Whether to append or create new file.
Pass 1 to append or 0 (default) for new file.
Returns "OK" on success.
DescriptionStarts logging all plugin calls to a text file.
If you pass a path, debug messages are written to the file. Else the plugin writes to debug console. See Console.app on Mac or DebugView on Windows.
See also Trace.Off and Trace.SetErrorsOnly.
On Linux, if no path is provided, the log output will go to stderr, which is usually redirected by our plugin to /FileMakerData/Logs/ or /opt/FileMaker/FileMaker Server/Logs/ folder. The log files are StdErrWeb.log and StdOutWeb.log for Web Direct and StdErrServerScripting.log and StdOutServerScripting.log for normal scripting (the names may change in different plugin versions).
On Windows with a FileMaker Server, you can see debug messages in DebugView if you run DebugView application as admin and enable global Win32 listening.
For FileMaker Server on macOS you can see messages in /Library/FileMaker Server/Logs/stderr file.
On Windows the log file is UTF-16 with BOM and CRLF as line endings. On macOS, Linux and iOS, you get an UTF-8 file with BOM and LF line endings.
See Trace.GetErrorsOnly, Trace.GetWithTimes, Trace.SetErrorsOnly and Trace.SetWithTimes to set options.
Added tracing of SQL commands for our SQL functions for v13.1. The SQL may be truncated around 4000 characters to limit how much text we log.
This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.
Log plugin calls to console:
Log plugin calls to desktop on Windows:
Log plugin calls to temp folder on Mac or Linux:
Log to log file on desktop:
Setup logging on server with multiple log files and times:
- Version 13.1
- Fixed a crash in trace function.
- Use Perform Script on Server inside Data API script
- MBS @ FMTraining.TV - Debugging your FileMaker Servers with the MonkeyBread Plug-in
- How to use Trace
- MBS @ FMTraining.TV - What’s New in the FileMaker MonkeyBread Plug-in - 13.2 Release
- Install a FileMaker 2023 Server in Linux in Parallels Desktop
- Additional iOS Script Triggers
- Install MBS Plugin on a FileMaker Server
- Trigger scripts via plugin and fmplugin extended privilege
- FileMaker Server with Data API Plugins
This function is free to use.
Created 18th August 2014, last changed 11st December 2023