Merge "Revert "SM service logs are being duplicated into postgres.log""
This commit is contained in:
commit
69c47ef5b8
@ -28,7 +28,7 @@ typedef struct
|
||||
{
|
||||
bool inuse;
|
||||
uint64_t log_seqnum;
|
||||
uint64_t service_log_seqnum;
|
||||
u_int64_t service_log_seqnum;
|
||||
char thread_name[SM_THREAD_NAME_MAX_CHAR];
|
||||
int thread_id;
|
||||
char thread_identifier[SM_THREAD_NAME_MAX_CHAR+10];
|
||||
|
@ -31,6 +31,12 @@
|
||||
#define SM_SYSLOG( format, args... ) \
|
||||
syslog( LOG_LOCAL3 | LOG_DEBUG, format "\n", ##args )
|
||||
|
||||
#define SM_WRITE_SYSLOG( format, args... ) \
|
||||
syslog( LOG_LOCAL3 | LOG_DEBUG, format "\n", ##args )
|
||||
|
||||
#define SM_WRITE_SERVICELOG( format, args... ) \
|
||||
syslog( LOG_LOCAL0 | LOG_DEBUG, format "\n", ##args )
|
||||
|
||||
#define SM_WRITE_SCHEDLOG( format, args... ) \
|
||||
fprintf( _sched_log, format "\n", ##args ); \
|
||||
fflush( _sched_log )
|
||||
@ -83,8 +89,8 @@ static void sm_debug_thread_dispatch( int selobj, int64_t user_data )
|
||||
|
||||
sm_time_get( &time_prev );
|
||||
|
||||
SM_SYSLOG( "time[%ld.%03ld] log<%" PRIu64 "> %s",
|
||||
(long) msg.u.log.ts_mono.tv_sec,
|
||||
SM_WRITE_SYSLOG( "time[%ld.%03ld] log<%" PRIu64 "> %s",
|
||||
(long) msg.u.log.ts_mono.tv_sec,
|
||||
(long) msg.u.log.ts_mono.tv_nsec/1000000,
|
||||
msg.u.log.seqnum, msg.u.log.data );
|
||||
|
||||
@ -126,7 +132,7 @@ static void sm_debug_thread_dispatch( int selobj, int64_t user_data )
|
||||
|
||||
sm_time_get( &time_prev );
|
||||
|
||||
SM_SYSLOG( "time[%ld.%03ld] sm_svc_log<%" PRIu64 "> %s",
|
||||
SM_WRITE_SERVICELOG( "time[%ld.%03ld] log<%" PRIu64 "> %s",
|
||||
(long) msg.u.log.ts_mono.tv_sec,
|
||||
(long) msg.u.log.ts_mono.tv_nsec/1000000,
|
||||
msg.u.log.seqnum, msg.u.log.data );
|
||||
|
@ -1,12 +1,9 @@
|
||||
#SM log filters
|
||||
filter f_smsvc { facility(local3) and match("sm_svc_log.*"); };
|
||||
filter f_local3 { facility(local3) and not filter(f_smsvc); };
|
||||
filter f_smsvc { facility(local0) and program(sm); };
|
||||
|
||||
#SM log destinaions
|
||||
destination d_smsvc { file("/var/log/sm-service.log"); };
|
||||
destination d_sm { file("/var/log/sm.log"); };
|
||||
|
||||
#SM log paths
|
||||
log { source(s_src); filter(f_smsvc); destination(d_smsvc); };
|
||||
log { source(s_src); filter(f_local3); destination(d_sm); };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user