Configuration

The erllog starts with default configuration.
The erllog can be configured using a configuration file only by calling the API –
erllog:configure(ConfigurationFilePath).

Have a look at the sample configuration file below.
The name of the configuration file does not matter.
Read the comments of the configuration file properly.


%%% ----------------------------------------------------------------------------
%%% This is erllog configuration file.
%%% Author - Sudipta Ghorui, sudipta05@gmail.com
%%% 
%%% ***Please not the following while you write your own configuration file -
%%% 	1. Filename and the extension of the file name does not matter.
%%% 	2. % is the line comment char.
%%% 	3. You can write anything you want in the conf file, 
%%%				the application will ignore them.
%%%		4. DO NOT use doubel/single (" / ') quote to specify the values. 
%%% ----------------------------------------------------------------------------

%%-------------------------------------------------------------------
% Choose the log levels which you want to support in your application.
% The super set of the log levels are (in decending order) - 
%			emergency, alert, critical, error, warn, notice, info, debug, console
% Application will ignore the levels which do not belong to the super set of 
% log levels.
% The order of your choice does not matter. 

erllog.levels 			= emergency, alert, critical, error, warn, notice, info, debug, console

%%-------------------------------------------------------------------


%%-------------------------------------------------------------------
% Choose the log level upto which the log will work.

erllog.rootLevel 		= debug

%%-------------------------------------------------------------------

%%-------------------------------------------------------------------
% Choose the format of the output of the log. 
% The available format definations - 
% 		~p = priority, level of log
% 		~d = date and time of log . (More date formats are coming)
% 		~m = module name from where the log is generated (Currently not available)
% 		~f = function name from where the log is generated (Currently not available)
% 		~l = log message
 
erllog.format			= [~p] ~d ~m - ~l

%%-------------------------------------------------------------------

%%-------------------------------------------------------------------
% Choose the file where the logs will be printed.

erllog.default.file 	= ../log/application.log
erllog.emergency.file 	= ../log/emergency.log
erllog.alert.file 		= ../log/alert.log
erllog.critical.file 	= ../log/critical.log
erllog.error.file 		= ../log/error.log
erllog.warn.file 		=  ../log/warn.log
erllog.notice.file 		=  ../log/notice.log
erllog.info.file 		=  ../log/info.log
erllog.debug.file 		=  ../log/debug.log
%%-------------------------------------------------------------------

%%-------------------------------------------------------------------
% Choose the size of the file after which the log file(s) will be 
% rotated. Value should be in Interger (Number of Bytes)

erllog.maxFileSize		= 100 %% in Bytes
%%-------------------------------------------------------------------


%%-------------------------------------------------------------------
% Syslog related configuration
%%-------------------------------------------------------------------
% Choose whether the syslog is on. value should be true/false

erllog.syslog.on 		= true
%%-------------------------------------------------------------------

%%-------------------------------------------------------------------
% The hostname/ip of the centralised syslog server

erllog.syslog.host 		= 192.168.10.238
%%-------------------------------------------------------------------

%%-------------------------------------------------------------------
% The port number of the centralised syslog server
erllog.syslog.port 		= 514

%%-------------------------------------------------------------------

%%-------------------------------------------------------------------
% Choose the syslog facility.
erllog.syslog.facility 	= user

%%-------------------------------------------------------------------
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: