UserLog is an Automation Studio library for writing to user logbooks synchronously.
UserLog's simple one-line functions provide an essential diagnostic tool for software development.
NOTE: This is not an official library and is supported through the community. UserLog is provided as-is under the MIT License agreement. Source code, documentation, and issues are managed through GitHub.
- 🔁 Write to logbooks synchronously
- ✏️ Fully customizable with message, code, and runtime data parameters
⚠️ Suppress messages with adjustable severity level- 📙 Create custom logbooks
- 📋 Compatible with text system
Function | Description |
---|---|
UserLogBasic | Write to the User logbook synchronously |
UserLogAdvanced | Write to the User logbook with runtime data |
UserLogCustom | Write to any user logbook synchronously |
UserLogEventText | Write to any user logbook through binary-encoded data and event texts |
UserLogCreate | Create a custom logbook in an Init subroutine |
UserLogSetSeverityLevel | Suppress messages below the input level and return previous level |
UserLogGetSeverity | Get ArEventLog severity from an event ID |
UserLogGetFacility | Get ArEventLog facility from an event ID |
UserLogGetCode | Get ArEventLog code from an event ID |
- Download the binaries and extract the archive
- Add to the project as existing library from the toolbox in logical view
- Clone or download source files
- Add to the project as existing library
- Option to add as reference
Alternatively, add as submodule to an existing project repository.
cd <repository>
git submodule add https://github.com/tmatijevich/UserLog.git <project>/Logical/Libraries/UserLog
Then add to project as existing library.
Users must add the following additional build options under the UserLog object's compiler properties in the software configuration.
-D IECSTRING_HEADER_EXPLICIT -D IECSTRING_FORMAT_TYPE_EXTERNAL
See the UserLogProject for unit tests of all functions.
Once installed, the help file can be viewed using the F1
function key.
See the UserLogHelp for the documentation source code.
- Tyler Matijevich (@tmatijevich)