Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Table of Contents
outlinetrue


Change Record

REVISION

DATE

AUTHOR

 

SECTIONS/PAGES AFFECTED

 

 

REMARKS

 

 

 

 

1.0

2000-09-10

Klemen Zagar

 

All

 

 

Created

 

 

 

 

1.10

2000-09-30

Klemen Zagar

 

All

 

 

G. Chiozzi's comments taken into account.
XML schema made more flat.

 

 

 

 

1. 20

2001-03-02

Klemen Zagar

 

All

 

 

J. Knudstrup's comments taken into account.
<Data> element added. LogId, StackId and StackLevel attributes added. <Variable> removed. LoggingProxy interface modified. DTD schemas written (appendix).

 

 

 

 

1.21

2001-03-16

Klemen Zagar

 

3.4, 3.4.1.4, 3.4.1.8, A

 

 

Final J. Knudstrup's comments taken into account. Redefined StackId and StackLevel, updated DTD schemas, fixed minor typos.

 

 

 

 

1.22

2001-03-26

Grega Milcinski

 

All

 

 

Applied ALMA template. Listing and Identifier styles added.

 

 

 

 

1.23

2001-03-30

Klemen Žagar

 

3, 3.2, 3.5, 4.1.3, 4.1.4

 

 

Gianluca Chiozzi's comments taken into account. COS_ macro prefix changed to ACS_. References to MACI and BACI removed (instrumentation of BACI is still described). Notification Channel usage defined. Archiving parameter types defined. Figure redrawn.

 

 

 

 

1.24

2001-11-08

Klemen Žagar

 

3.4.1.6, 3.5.3

 

 

Priority now ranges from 1 to 15. ACS_LOG example fixed.

 

 

 

 

1.25

2001-12-20

Klemen Žagar

 

All

 

 

Removed reference to "CoCoS" and "Device". The latter has been replaced with "Distributed Object". Removed XML schema diagrams.

 

 

 

 

1.26

2002-01-04

Klemen Žagar

 

4.1.1, 4.1.5

 

 

Archiving configuration properties made consistent with implementation.

 

 

 

 

1.27

2002-11-25

R. Georgieva

 

3.4.1.8.

 

 

Escaping delineating characters within log messages.

 

 

 

 

1.28

2002-03-03

R.Georgieva

 

 

 

 

Java Logging API and Python Logging API added.

 

 

 

 

1.29

2003-11-1

 

 

 

 

 

Revised for ACS 3.0

 

 

 

 

1.30

2004-07-23

G.Chiozzi

 

 

 

 

Updated XML Schema

 

 

 

 

1.31

2005-03-17

G.Chiozzi

 

 

 

 

Updated documentation on Archiving

 

 

 

 

1.32

2005-05-19

G.Chiozzi

 

 

 

 

Removed schema documentation from appendix and referenced online documentation.

 

 

 

 

1.33

2006-05-11

D. Fugate

 

 

 

 

Python section was horribly out of date.

 

 

 

 

1.34

2007-02-12

N. Barriga

 

Section 3.7

 

 

Added documentation about type safe logs usage.

 

 

 

 

1.35

2007-02-20

N. Barriga

 

Section 3.5

 

 

Fixed example on how to get a logger in Java.

 

 

 

 

1.36

2007-07-30

N. Barriga

 

Sections 3.4, 3.5, 3.6

 

 

Added new API for specifying an audience, antenna and array to the logs.

 

 

 

 

1.371.37

2014-12-162014-12-16

M. MañasM. Mañas

 

AllAll

 

 

General document update and refurbishment.
Added new logging statistics module specification.
Added new statistics module online configuration.General document update and refurbishment.
Added new logging statistics module specification.
Added new statistics module online configuration.

 

 

 

 

1.38

2016-04-19

 

P. Colomer

 

Section 3.2

 

Added description of auto reconnection functionality of publishers in the Centralized Logging Service

 

 

 

 

...

Code Block
languagexml
<LogEntryType TimeStamp="yyyy-MM-ddThh:mm:ss.fff"
			File="filename" Line="lineno" 
			Routine="routine"
			Host="hostname" Process="procname" Thread="threadname" Context="context"
			SourceObject="source"
			StackId="stackid" StackLevel="stacklevel"
			LogId="id" Uri="uri"
			Priority="p">
	<Data Name="name">value</Data>
		log entry message
</LogEntryType>

...

Code Block
languagexml
 <Error TimeStamp="2000-08-23T13:18:27.432"
       File="FileOpener.cpp" Line="131" Routine="FileOpener::Open"
       Host="Hurricane" Process={_}"{_}Activator" Thread="EventLoop"
       LogID="err_File_Not_Found" Priority="8">
    <Data Name="FullPath">/home/someuser/file.txt</Data>
    <!\[CDATA\[Message\]\]>
</Error>


ACS log levels

...

Code Block
languagecpp
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
\\
\\
#include <maciSimpleClient.h>
\\
int main(int argc, char *argv\[\])
\{
        maci::SimpleClient client;
\\
        if (client.init(argc,argv) == 0)\{
                return -1;
        \}
        else\{
                // Log into the manager before doing anything
                client.login();
        \}
\\
        ACS_SHORT_LOG((LM_WARNING,"ACS_SHORT_LOG"));
        LOG_FULL(LM_WARNING,"main","LOG_FULL",log_audience::OPERATOR,"array01","Antenna01");
        LOG_WITH_ANTENNA_CONTEXT(LM_WARNING,"main","LOG_WITH_ANTENNA_CONTEXT","array01","Antenna01");
        LOG_TO_AUDIENCE(LM_WARNING,"main","LOG_TO_AUDIENCE",log_audience::OPERATOR);
        client.logout();
\\
        return 0;
\\
\}
\\

Logging statistics configuration

...

Code examples

Code Block
languagecpp
\\
#include "loggingACSLogger.h"
#include "loggingHandler.h"
#include "loggingLogTrace.h"
#include "logging.h"
\\
int main(int argc, char *argv\[\])
\{
    ACS_CHECK_LOGGER;
\\
    // Create logger (by default statistics are inactive)
    Logging::Logger::LoggerSmartPtr firstLoggerSmartPtr = getLogger();
    firstLoggerSmartPtr->setName("FirstLogger");
\\
    // Activate statistics for the logger
    firstLoggerSmartPtr->stats.configureStatistics("testLoggerStats",false, 600, 1);
\\
    // Direct log example (will be counted)
    logger->log(Logging::Logger::LM_TRACE, "Testing LM_TRACE message: Messages indicating function-calling sequence");
\\
    // Macro log example (will be counted)
    ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_DEBUG, "Test of LM_DEBUG log"));
\\
    return 0;
\}
\\

Log examples

The statistics report is a log with additional data containing the name of the logger and the identificator of the statistics module (if configured) as well as the statistics calculated and described on §3.5

No Format
2015-07-15T13:59:04.890 [GlobalLogger - virtual Logging::Logger::~Logger()] LOGGING STATISTICS FOR: testLoggerStats.FirstLogger ErrorMessageIncrement="nan" MessageIncrement="-26.6667" LastPeriodNumberOfErrorMessages="0" LastPeriodNumberOfMessages="22" LastPeriodDuration="0.123412" ErrorMessageStatistics="0" MessageStatistics="178.265" StatisticsGranularity="1" LoggerId="FirstLogger" StatisticsIdentification="testLoggerStats"


Online (re)configuration

The logging statistics module can be re-configured while in operation independently of the programming language of the module (for nominal configuration see §3.6.7 for cpp, §3.7.11 for java and §3.8.2 for python). Re-configuration can be achieved by means of the binary "maciContainerLogStatsConfiguration" which can be executed with the following options:

...