Logging - trace files

 This information is written in English only

Logging description

Microsoft Enterprise Library 6 is used for logging.

 

BAM-client uses 4 logging levels:

  1. Standard trace file {ApplicationFolder}\Logs\trace.log

  2. Configuration application tool trace file {ApplicationFolder}\Logs\configuration.trace.log

  3. Crash log file. Created when some unexpected error occurs {ApplicationFolder}\crash.log

  4. Custom log file. Name, location and other settings can be defined in Logger.config (not used/delivered by default)

 

Default BAM client setup folder - {ApplicationFolder} - is:

  • Windows x32 – Program Files\Buypass\Buypass Access Manager

  • Windows x64 – Program Files (x86)\Buypass\ Buypass Access Manager

 

  If an attempt is made to write to a log file that is in use or unavailable, the file name is automatically prefixed by a GUID. Few BAM client instances started in parallel will produce log files with GUID in prefix.

Window 7 with User Access Control option (UAC) has some restrictions connected to writing to the “Program Files”-folder and subfolders. Current installation has implemented corresponding changes to the security rights for the BAM client folder to allow write access to all Operators.

 

Categories

Categories allow you to specify the target(s) for log entries processed by the block. You can define categories that relate to one or more targets. For example, you might create a category named General containing trace listeners that write to text files and XML files, and a category named Auditing for administrative information that is configured to use trace listeners that write to one or more databases.

Standard trace file and crash log file is configured to store any category log messages. Custom log can be configured to store everything from nothing to every category log messages.

Name

Used for

Name

Used for

General

All log, not described in other categories

Scard

SmartCard adapter log

Backend

Backend adapter log (AD, CA…)

BuypassBackend

LTS adapter log

Hardware

Hardware adapter log (Acr88/89, Scanner…)

ViewModel

View models log


Severity levels

Critical

Allows   only Critical events through. A critical event is a fatal error or application crash.

Error

Allows Critical and Error events through. An Error event is a recoverable error.

Warning

Allows CriticalError, and Warning events through. A Warning event can indicate both critical and non-critical issues.

Information

Allows CriticalErrorWarning, and Information events through. An information event is an informational message.

Verbose

Allows CriticalErrorWarningInformation, and Verbose events through. A Verbose event is a debugging trace.

 

Logs

Trace.log

  • Categories: All

  • Severity level: Level can be set in local config - see Configuration tool -> Logs

  • Output: File

  • File location: {ApplicationFolder}\Logs\trace.log  (ex. c:\Program Files\Buypass\Lra Client\Logs\ trace.log)

  • New file will be created every day or when file size reaches 10,000kb.
    Previous file will be renamed with pattern "yyyy.MM.dd HH.mm" (ex. trace.2013.12.02 13.20.log)

 

Crash.log

  • Categories: All

  • Severity level: Verbose

  • Output: File

  • File location: {ApplicationFolder}\{"yyyy.MM.dd HH.mm.ss "}crash.log

  • This file created when a serious failure appears and BAM-client stops working. It contains last 200 log messages

 

Configuration.trace

Default Configuration Application Tool log file. Has the same configuration as BAM-client trace log file. Because of we use the same logger implementation for BAM-client and Configuration Application the prefix configuration was added to avoid GUID prefix in case when BAM-client and Configuration Application started in parallel.

 

Custom log

  • Logger.config file shoud be used to create custom log configuration

  • Categories: configurable (None – All)

  • Severity level:  configurable (None – All)

  • Output: configurable (One or many output like file, mail, Event viewer, database …)

 

This is additional optional possibility to log. This custom configuration is independent and will not affect to the other logs.

Custom log configuration is a highly flexible and configurable. It allows creating and storing log messages in a wide variety of locations, categorizing and filtering messages, and collecting contextual information useful for debugging and tracing as well as for auditing and general logging requirements.

For example it may be used to store logs to Event viewer. We don’t need any changes in Lra Client sources to store log in one or another way using this possibility.

More detail description how to configure custom logger can be found MSDN.