Settings changing during process execution

General discussions here

Moderator: rgerhards

Google Ads


Settings changing during process execution

Postby vagnergrossklaus » Tue Aug 01, 2017 9:25 pm

Hello, we have a problem in our application, that when using a certain library the log settings we defined for our application changes, writing the logs in / var / log / messages and like INFO, the library developer says not to be Using rsyslog to generate the library logs.
Has anyone had a similar situation?

Our application configures the log as cisslive-pdv, when calling the library changes to clisitef:

Jul 28 11:18:42 raspberrypi cisslive-pdv: [INFO ] (null) Conectando servidorTEF [ipConexao] 172.16.106.50 [idEmpresa] 0 [idCaixa] 594
Jul 28 11:18:42 raspberrypi clisitef: [INFO ] (null) Retorno conexão SITEF[resultadoConexao] 0
vagnergrossklaus
New
 
Posts: 2
Joined: Tue Aug 01, 2017 9:06 pm

Urgent Question?

  • Pulling out your Hair?
  • Wasting Time and Money?
  • Deadline Approaching?

Re: Settings changing during process execution

Postby dlang » Wed Aug 02, 2017 10:36 am

my guess is that sometimes your program is logging with the programname as part of the log, and sometimes it isn't and rsyslog is making an educated guess as to what it should put in that field.

log with the template RSYSLOG_DebugFormat and see what the rawmsg that rsyslog is getting looks like, as well as how everything gets parsed.
dlang
Frequent Poster
 
Posts: 1001
Joined: Mon Sep 15, 2008 7:44 am

Re: Settings changing during process execution

Postby vagnergrossklaus » Wed Aug 02, 2017 1:15 pm

Ok, I changed the template and the output was as follows:

Debug line with all properties:
FROMHOST: 'vagnerklaus-nb', fromhost-ip: '127.0.0.1', HOSTNAME: 'vagnerklaus-nb', PRI: 182,
syslogtag 'cisslive-pdv:', programname: 'cisslive-pdv', APP-NAME: 'cisslive-pdv', PROCID: '-', MSGID: '-',
TIMESTAMP: 'Aug 2 09:06:24', STRUCTURED-DATA: '-',
msg: ' [INFO ] int caixa::core::service::ConfiguradorSiTEFService::configurarSiTEF() Conectando servidor TEF [ipConexao] 192.168.0.93 [idEmpresa] 0 [idCaixa] 105'
escaped msg: ' [INFO ] int caixa::core::service::ConfiguradorSiTEFService::configurarSiTEF() Conectando servidor TEF [ipConexao] 192.168.0.93 [idEmpresa] 0 [idCaixa] 105'
inputname: imuxsock rawmsg: '<182>Aug 2 09:06:24 cisslive-pdv: [INFO ] int caixa::core::service::ConfiguradorSiTEFService::configurarSiTEF() Conectando servidor TEF [ipConexao] 192.168.0.93 [idEmpresa] 0 [idCaixa] 105'
$!:
$.:
$/:

Debug line with all properties:
FROMHOST: 'vagnerklaus-nb', fromhost-ip: '127.0.0.1', HOSTNAME: 'vagnerklaus-nb', PRI: 14,
syslogtag 'clisitef:', programname: 'clisitef', APP-NAME: 'clisitef', PROCID: '-', MSGID: '-',
TIMESTAMP: 'Aug 2 09:06:24', STRUCTURED-DATA: '-',
msg: ' [INFO ] int caixa::core::service::ConfiguradorSiTEFService::configurarSiTEF() Retorno conexão SITEF [resultadoConexao] 0'
escaped msg: ' [INFO ] int caixa::core::service::ConfiguradorSiTEFService::configurarSiTEF() Retorno conexão SITEF [resultadoConexao] 0'
inputname: imuxsock rawmsg: '<14>Aug 2 09:06:24 clisitef: [INFO ] int caixa::core::service::ConfiguradorSiTEFService::configurarSiTEF() Retorno conexão SITEF [resultadoConexao] 0'
$!:
$.:
$/:

I do not know much about rsyslog, so I may not be seeing the problem in this log.
vagnergrossklaus
New
 
Posts: 2
Joined: Tue Aug 01, 2017 9:06 pm

Re: Settings changing during process execution

Postby dlang » Wed Aug 02, 2017 2:04 pm

look at the rawmsg section of each log, in the first, the application used the string "cisslive-pdv:", in the second, it used the string "clisitef:"

rawmsg: '<182>Aug 2 09:06:24 cisslive-pdv: [INFO ] int caixa::core::service::ConfiguradorSiTEFService::configurarSiTEF() Conectando servidor TEF [ipConexao] 192.168.0.93
[idEmpresa] 0 [idCaixa] 105'

vs.

rawmsg: '<14>Aug 2 09:06:24 clisitef: [INFO ] int caixa::core::service::ConfiguradorSiTEFService::configurarSiTEF() Retorno conexão SITEF [resultadoConexao] 0'


So rsyslog is accurately reporting and passing along what the application provided. So you will need to investigate the application to find out why it is logging differently.
dlang
Frequent Poster
 
Posts: 1001
Joined: Mon Sep 15, 2008 7:44 am

Google Ads



Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron