Commit Graph

24 Commits

Author SHA1 Message Date
acb0a523a7 Log: No more argv parsing for log manager.
Earlier, the global setting for the syslog decided whether syslog
was enabled when skygw_logmanager_init was called, but not whether
logging to syslog actually was made.

Now syslog logging is enabled by default and the global setting
decides whether or not syslog logging actually is made. That is,
this opens up the possiblity for making it possible to turn on
and off sysloging at runtime.

Further, although the API led you to believe otherwise, it was
hardwired that LOGFILE_ERROR and LOGFILE_MESSAGE messages were
written to syslog.

The changed removed the need for passing an argv array explicitly.
2015-11-11 13:53:14 +02:00
24bed47794 Syslog ident must be provided explicitly.
The syslog ident must be provided explicitly when calling
skygw_logmanager_init (and not provided via the argv array).
It can be NULL, in which case it automatically will be the program
name.

The openlog() call is now always made, irrespective of what the
value of the global syslog flag is. That way it will be possible
to turn syslog logging on or off after the fact.
2015-11-11 13:48:57 +02:00
55dbaa49c0 Logging target must be explicitly defined.
Whether the log-file should be written to the filesystem or to
shared memory must now be explicitly defined when calling
skygw_logmanager_init() (instead of passing that via the argc/argv
construct).

Also, the meaning of '-l' when invoking maxscale has been changed.

Earlier -l [file|shm] specified whether the trace and debug logs
should be written to shared memory (while the error and message
logs always were written to the filesystem) and the _default_
was to write them to shared memory.

Now, with only one file, '-l' has still the same meaning, but it
decides whether the one and only logfile should be written to shared
memory, or the filesystem and the _default_ is to write it to the
filesystem.
2015-11-11 13:47:34 +02:00
450078fa92 Interface of skygw_logmanager_init(int argc, char* argv[]) changed.
The previous interface of skygw_logmanager_init was conceptually
broken. With -o you could specify that logging should be done to
stdout. However, even if you did that, the log manager still checked
that the logging directory could be accessed. Unless it had been
specified using -j <path> the default was /var/log/maxscale.

That is, unless the program calling skygw_logmanager_init was invoked
by a user that had write access to /var/log/maxscale, there would be
a complaint even if nothing was ever written to that directory.
In practice this meant that even if -o was used you had to provide
a -j with a path that surely is writeable (e.g. "/tmp").

This has now been changed so that you explicitly must provide the
log directory and the flags -j and -o are removed.

  bool skygw_logmanager_init(const char* logdir, int argc, char* argv[]);

If /logdir/ is provided then logged messages are written to a log file
in that directory. If /logdir/ is NULL then messages are logged to stdout
and no checks for access to any directory is not made.
2015-11-06 14:20:05 +02:00
834a88aeda Log variables moved to log_manager.h
The log manager variables lm_enabled_log_files_bitmask, log_ses_count
and tls_log_info that earlier were declared separately in every
c-file are now declared in the log_manager.h header.
2015-11-04 14:26:53 +02:00
d7d009f3b3 Merge from develop
Merge from develop
2015-10-28 09:38:31 +01:00
a718c995ae Added blr_print_binlog_details
Added blr_print_binlog_details
2015-10-27 17:33:15 +01:00
3f4acf4bc5 Added support for SHOW [GLOBAL] STATUS LIKE 'Uptime'
Added support for SHOW [GLOBAL] STATUS LIKE 'Uptime'
2015-09-15 09:17:52 +02:00
b4637edd59 Added skygw_log_sync_all
Added skygw_log_sync_all
2015-09-10 15:01:01 +02:00
c9fd82839b Merge from develop
Merge from develop
2015-09-10 14:53:50 +02:00
7d00a3670d Addition of maxbinlogcheck, a new utility in bin
Addition of maxbinlogcheck, a new utility in bin
2015-09-10 14:37:49 +02:00
8d0add5a1a Funcion names removed from maxbinlogcheck messages
Funcion names removed from maxbinlogcheck messages
2015-09-09 10:26:21 +02:00
9bfefa95ae maxbinlogcheck update
maxbinlogcheck update
2015-09-08 17:27:28 +02:00
d6be8361fa Added Transaction Summary with events and bytes
Added Transaction Summary with events and bytes
2015-09-07 18:17:03 +02:00
54ee264daf Added skygw_log_enable if debug option is set
Added skygw_log_enable if debug option is set
2015-08-26 18:00:39 +02:00
f60254f626 Added MariaDB 10 transaction detection
Added MariaDB 10 transaction detection
2015-08-26 17:32:45 +02:00
a698470ae0 Added limitation for MariaDB 10
Added limitation for MariaDB 10
2015-08-26 14:30:09 +02:00
262b64eb39 Log messages updated
Log messages updated
2015-08-26 11:42:24 +02:00
cfea4dd4ab Verbose option removed
Verbose option removed
2015-08-26 11:39:40 +02:00
a1f3adfedc Fix for leading /
Fix for leading /
2015-08-26 11:32:42 +02:00
e012018e7d Added option for mariadb 10 binlog compatibility
Added option for mariadb 10 binlog compatibility
2015-08-26 11:23:05 +02:00
5f328bfcf9 Fix for missing leading /
Fix for missing leading /
2015-08-26 11:13:27 +02:00
5a06f61bb7 print version update
print version update
2015-08-26 10:57:25 +02:00
05326563ee Added MaxScale binlog check utility
Added MaxScale binlog check utility
2015-08-26 10:51:35 +02:00