From c2ddecc2b1dbc9d055166bdf296da2e4536f74f6 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 27 Aug 2010 20:56:28 -0400 Subject: Added a new logging system --- data/example.conf | 112 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 75 insertions(+), 37 deletions(-) (limited to 'data') diff --git a/data/example.conf b/data/example.conf index 7dc9c1685..65d94ad5f 100644 --- a/data/example.conf +++ b/data/example.conf @@ -201,23 +201,6 @@ serverinfo */ networkinfo { - /* - * If set, Services will output log messages to the given channel. This - * directive is optional. - * - * IMPORTANT: This can be a security risk, so make certain this channel is - * sufficiently protected from normal access. - */ - #logchannel = "#services" - - /* - * If set, Services will output all BotServ chatter to the defined logchannel - * above. It shows all uses of BotServ ACT and SAY commands. Note that there - * is no logging to the log file. Only works if logchannel is also defined. - * This directive is optional. - */ - #logbot = yes - /* * This is the name of the network that Services will be running on. */ @@ -475,13 +458,6 @@ options */ #dumpcore = yes - /* - * If set, Anope will log user connections, disconnections, and nickname - * changes. You may have to do so in case you ever need to transmit user - * information to your local authorities. This directive is optional. - */ - #logusers = yes - /* * If set, Services will only show /stats o to IRC Operators. This directive * is optional. @@ -546,12 +522,6 @@ options */ ulineservers = "stats.your.network" - /* - * If set, Services will start logging to the log channel immediatly on startup. - * This directive is optional, and has no effect if logchannel is not defined. - */ - #enablelogchannel = yes - /* * Default modes for mode lock, these are set on newly registered channels. */ @@ -580,6 +550,80 @@ options hideprivilegedcommands = no } +/* + * [RECOMMENDED] Logging Configuration + * + * This section is used for configuring what is logged and where it is logged to. + * You may have multiple log blocks if you wish. Remember to properly secure any + * channels you choose to have Anope log to! + */ +log +{ + /* + * Target(s) to log to. If it starts with a # it is assumed to be a channel, otherwise + * it will log to a file. + */ + target = "services.log" + /* Log to both services.log and the channel #services */ + //target = "services.log #services" + + /* + * The source(s) to only accept log messages from. Leave commented to allow all sources. + * This can be a users name, a channel name, one of our clients (eg, OperServ), or a server name. + */ + //source = "" + + /* + * The number of days to keep logfiles, only useful if you are logging to a file. + * Set to 0 to never delete old logfiles. + * + * Note that Anope must run 24 hours a day for this feature to work correctly. + */ + logage = 7 + + /* + * What types of log messages should be logged by this block. There are nine general categories: + * + * admin - Execution of admin commands (OperServ, etc). + * override - A services operator using their powers to execute a command they couldn't normally. + * commands - Execution of general commands. + * servers - Server actions, linking, squitting, etc. + * channels - Actions in channels such as joins, parts, kicks, etc. + * users - User actions such as connecting, disconnecting, changing name, etc. + * normal - Miscelanious messages. + * rawio - Logs raw input and output from services + * debug - Debug messages (log files can become VERY large from this). + * + * These options determin what messages from the categories should be logged. Wildcards are accepted, and + * you can also negate values with a ~. For example, "operserv/* ~operserv/akill" would log all operserv + * messages except for operserv/akill. + * + * Valid admin, override, and command options are: + * pesudo-serv/commandname (eg, operserv/akill, chanserv/set) + * + * Valid server options are: + * connect, quit, sync + * + * Valid channel options are: + * create, destroy, join, part, kick, leave, mode + * + * Valid user options are: + * connect, disconnect, quit, nick, ident, host, mode, maxusers + * + * Normal and debug are simple yes/no answers, there are no types for them. + * + * Note that modules may add their own values to these options. + */ + admin = "operserv/*" + override = "chanserv/* nickserv/* memoserv/set botserv/* ~botserv/set" + commands = "~operserv/* *" + servers = "*" + //channels = "~mode *" + users = "connect disconnect nick" + normal = yes + rawio = no + debug = no +} /* * [RECOMMENDED] Oper Access Config @@ -594,7 +638,7 @@ options * * Available privileges: * botserv/administration - Can perform certain BotServ administrative tasks - * chanserv/access/modify - Can modify channel access lists + * chanserv/access/modify - Can modify channel access and akick lists * chanserv/auspex - Can see any information with /chanserv info * chanserv/no-register-limit - May register an unlimited number of channels and nicknames * chanserv/set - Can modify the settings of any channel (incl. changing of the owner and password!) @@ -1301,12 +1345,6 @@ operserv */ #superadmin = yes - /* - * If set, causes Services to write a message to the log every time a new user maximum is set. - * This directive is optional. - */ - logmaxusers = yes - /* * These define the default expiration times for, respectively, AKILLs, CHANKILLs, SNLINEs, * SQLINEs, and SZLINEs. -- cgit