Set the MasterServer logging level

31 views
Skip to first unread message

Flavio Longano

unread,
Oct 9, 2015, 5:25:19 AM10/9/15
to openSCADA
Hey all,
as usual i've got an easy question for all the entusiasthic developer out there!

Is there a way to configure the logging level on the console of my Master Server (and all the Equinox applications)?

My console is always flooded with DEBUG rows like that one:

11:20:59.426 [HiveStatsTimer/1] DEBUG o.e.s.d.s.c.impl.stats.CounterValue - LastTickValue: 0, Diff: 1, Avg: 0.0


Maybe i cant figure it out cause i'm quite new with Equinox and OSGi, or maybe is an Eclipse SCADA option, but anyway, how can i set it to keep out the DEBUG info from my console? I hope there is some -D option i can put in my "Run configuration"!

Thx for any help!

CptMauli

unread,
Oct 9, 2015, 5:38:10 AM10/9/15
to openSCADA
Hi,

it is actually not that complicated. Unfortunately the default log level is DEBUG at the moment, but you can customize it quite easily.

You need a logback.xml file with this content:

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>
<!--
  <logger name="org.openscada.hd" level="DEBUG"/>
  --> 
  <root level="ERROR">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>

Then you need to specify for logback where that is, so you need to add a property: in my case this: -Dlogback.configurationFile=C:/cygwin64/home/jrose/Projekte/ECLIPSESCADA-DEMO/git/org.eclipse.scada.sandbox/logback.xml

You can add that to a master server configuration. In the infrastructure model (.esim) you create (or just reuse an existing configuration) a configuration under configurations and add there "Generic VM Settings". In arguments you just add the line above. In the master server you can then define which configuration to use.

I hope that helps.

best regards
Jürgen

Flavio Longano

unread,
Oct 9, 2015, 6:16:45 AM10/9/15
to openSCADA
It was easy and quick, now i can select e reformat what i need to be printed!

Thanks a lot captain! (Cpt stands for Captain?)

CptMauli

unread,
Oct 9, 2015, 6:44:39 AM10/9/15
to openSCADA
Jupp, you are right ;-) That handle dates way back, and its pretty unique
Reply all
Reply to author
Forward
0 new messages