Subversion Repository Public Repository

paulgoughbooks_old

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php namespace Config;

use CodeIgniter\Config\BaseConfig;

class Logger extends BaseConfig
{
	/*
	|--------------------------------------------------------------------------
	| Error Logging Threshold
	|--------------------------------------------------------------------------
	|
	| You can enable error logging by setting a threshold over zero. The
	| threshold determines what gets logged. Any values below or equal to the
	| threshold will be logged. Threshold options are:
	|
	|	0 = Disables logging, Error logging TURNED OFF
	|	1 = Emergency Messages  - System is unusable
	|	2 = Alert Messages      - Action Must Be Taken Immediately
	|   3 = Critical Messages   - Application component unavailable, unexpected exception.
	|   4 = Runtime Errors      - Don't need immediate action, but should be monitored.
	|   5 = Warnings               - Exceptional occurrences that are not errors.
	|   6 = Notices            - Normal but significant events.
	|   7 = Info             - Interesting events, like user logging in, etc.
	|   8 = Debug                - Detailed debug information.
	|   9 = All Messages
	|
	| You can also pass an array with threshold levels to show individual error types
	|
	| 	array(1, 2, 3, 8) = Emergency, Alert, Critical, and Debug messages
	|
	| For a live site you'll usually enable Critical or higher (3) to be logged otherwise
	| your log files will fill up very fast.
	|
	*/
	public $threshold = 3;

	/*
	|--------------------------------------------------------------------------
	| Date Format for Logs
	|--------------------------------------------------------------------------
	|
	| Each item that is logged has an associated date. You can use PHP date
	| codes to set your own date formatting
	|
	*/
	public $dateFormat = 'Y-m-d H:i:s';

	/*
	|--------------------------------------------------------------------------
	| Log Handlers
	|--------------------------------------------------------------------------
	|
	| The logging system supports multiple actions to be taken when something
	| is logged. This is done by allowing for multiple Handlers, special classes
	| designed to write the log to their chosen destinations, whether that is
	| a file on the getServer, a cloud-based service, or even taking actions such
	| as emailing the dev team.
	|
	| Each handler is defined by the class name used for that handler, and it
	| MUST implement the CodeIgniter\Log\Handlers\HandlerInterface interface.
	|
	| The value of each key is an array of configuration items that are sent
	| to the constructor of each handler. The only required configuration item
	| is the 'handles' element, which must be an array of integer log levels.
	| This is most easily handled by using the constants defined in the
	| Psr\Log\LogLevel class.
	|
	| Handlers are executed in the order defined in this array, starting with
	| the handler on top and continuing down.
	|
	*/
	public $handlers = [

		//--------------------------------------------------------------------
		// File Handler
		//--------------------------------------------------------------------

		'CodeIgniter\Log\Handlers\FileHandler' => [

			/*
			 * The log levels that this handler will handle.
			 */
			'handles'         => [
				'critical',
				'alert',
				'emergency',
				'debug',
				'error',
				'info',
				'notice',
				'warning',
			],

			/*
			 * The default filename extension for log files.
			 * An extension of 'php' allows for protecting the log files via basic
			 * scripting, when they are to be stored under a publicly accessible directory.
			 *
			 * Note: Leaving it blank will default to 'log'.
			 */
			'fileExtension'   => '',

			/*
			 * The file system permissions to be applied on newly created log files.
			 *
			 * IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
			 * integer notation (i.e. 0700, 0644, etc.)
			 */
			'filePermissions' => 0644,

			/*
			 * Logging Directory Path
			 *
			 * By default, logs are written to WRITEPATH . 'logs/'
			 * Specify a different destination here, if desired.
			 */
			'path'            => '',
		],

		/**
		 * The ChromeLoggerHandler requires the use of the Chrome web browser
		 * and the ChromeLogger extension. Uncomment this block to use it.
		 */
		//      'CodeIgniter\Log\Handlers\ChromeLoggerHandler' => [
		//          /*
		//           * The log levels that this handler will handle.
		//           */
		//          'handles' => ['critical', 'alert', 'emergency', 'debug',
		//                        'error', 'info', 'notice', 'warning'],
		//      ]
	];
}

Commits for paulgoughbooks_old/trunk/app/Config/Logger.php

Diff revisions: vs.
Revision Author Commited Message
2 tporter picture tporter Tue 03 Nov, 2020 08:50:21 +0000

Migration of Paul Goughs Books site to Codeignitor 4