tmatijevich / UserLog

Write to user logbooks synchronously

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UserLog

Made for B&R GitHub License GitHub Downloads (all assets, all releases) GitHub issues

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.

2023-11-17_15-06-35

Features

  • ๐Ÿ” 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

Install

  1. Download the binaries and extract the archive
  2. Add to the project as existing library from the toolbox in logical view

Build

  • 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

Unit Tests

See the UserLogProject for unit tests of all functions.

Documentation

Once installed, the help file can be viewed using the F1 function key.

See the UserLogHelp for the documentation source code.

Dependencies

Authors

About

Write to user logbooks synchronously

License:MIT License


Languages

Language:C 84.8%Language:Standard ML 15.2%