Pierre Goiffon
336637a7a4
SetupLog : ease changing manually the default level
...
In setup no conf file available so the log_level_min config option cannot be read
A solution is to manually change this constant
2020-05-28 11:40:22 +02:00
Pierre Goiffon
0ffa2850ea
Deadlock log : log inside a dedicated log file instead of creating an EventIssue object ( #139 )
...
First log implementation (75730ee ) was creating EventIssue objects, and was rollbacking transaction if it exists
The new one has some benefits :
* always log one line by default in log/error.log, but details must be activated though config (channels `Deadlock-WaitTimeout` and `Deadlock-Found`)
* detailed logs are in a dedicated file (log/deadlock.log) :
- easier for our clients to get and share
- has rotation by default
- looking at the file size is a direct way to know if error happened
- more compliant to industry standards !
* the transaction stays untouched, so that the consumer can do whatever it prefers
2020-05-14 17:49:05 +02:00
Pierre Goiffon
7ec7626aa0
N°2977 PHP Doc change
2020-05-04 18:13:40 +02:00
Pierre Goiffon
5d7582bb6f
N°2977 LogAPI : restore default log level to OK, and really allow LEVEL_DEFAULT overloads
...
* Level was changed by mistake to trace with refactoring in 289171b9
Thanks @v-dumas !
* self wouldn't allow to override
see https://www.php.net/manual/fr/language.oop5.late-static-bindings.php
Thanks @bruno-ds !
* improve PHPDoc !
2020-05-04 16:55:46 +02:00
Pierre Goiffon
bf13f9fc8a
N°2975 improve RotatingLogFileNameBuilder next cron occurrence computation
2020-04-30 08:41:55 +02:00
Pierre Goiffon
289171b9f1
N°2977 LogAPI : allow to overwrite the default log level
2020-04-29 15:16:45 +02:00
Pierre Goiffon
eadc3b72c2
📝 N°2793 log rotation add PHPDoc about timezones
2020-03-04 14:23:34 +01:00
odain
c06f8e9a98
N°2793 log rotation test : fix timezone issues
2020-03-04 12:05:42 +01:00
Pierre Goiffon
6675d7d42a
N°2793 Test log rotation
2020-03-04 09:21:05 +01:00
Pierre Goiffon
29d24faf52
N°2793 Log rotation : fix no rotation :/
...
Was caused by erroneous file exists test
2020-03-03 10:18:09 +01:00
Pierre Goiffon
33f3f2810e
N°2793 Log rotation : add file exists check in the lock
2020-03-02 18:33:00 +01:00
Pierre Goiffon
56ef6feadf
N°2820 Log rotation : new MonthlyRotatingLogFileNameBuilder class
2020-03-02 15:52:59 +01:00
Pierre Goiffon
2be16f9078
N°2793 Log rotation ( #117 )
...
Now log file name is unchanged : current log is still /log/error.log \o/
Rotation check (using file last modification time) is done :
* on each file write : we don't want to miss calls if session last from 23:59:59 to 00:01 for example ! Though the filemtime() call is done once per session to lower performance impacts
* using a new background process (LogFileRotationProcess)
File renaming on setup is therefore removed.
Also the interface is renamed (from ILogFileNameBuilder to iLogFileNameBuilder) to conform to iTop convention.
2020-03-02 15:01:12 +01:00
bruno DA SILVA
c09bd2bfc6
2626 - log modularity: filterable logs using minimal log level per channel
...
🔊 Adding log level Trace, which is not logged by default (as for Debug)
2019-12-19 11:17:18 +01:00
Pierre Goiffon
358efb0f2f
N°2518 Change log level for non existent legacy log file when trying to rename
2019-12-18 09:28:11 +01:00
bruno DA SILVA
3f154fa765
2626 - log modularity: filterable logs using minimal log level per channel
...
🐛 logs are no more written twice.
2019-12-17 12:33:34 +01:00
odain
abd5e27c2e
fix and complete testcase
2019-12-12 14:22:49 +01:00
odain
6ec441e501
peer review: added tests but not passed yet
2019-12-12 08:43:01 +01:00
Pierre Goiffon
18db31f138
Log : rename config parameter from 'min_log_level' to 'log_level_min'
2019-12-10 09:46:42 +01:00
Pierre Goiffon
332c6eb33c
log : factorize level & context
2019-12-10 09:39:46 +01:00
bruno DA SILVA
e5c49e3bd4
filterable logs using min_log_level optionnaly per channels
2019-12-10 09:03:14 +01:00
Pierre Goiffon
16c4f18a81
N°2518 fix log call is crashing when invalid log_filename_builder_impl value set in config
2019-10-22 15:15:40 +02:00
Pierre Goiffon
cd6104ddb3
N°2518 If switching to log file rotation, rename setup/error legacy files
2019-10-22 15:08:48 +02:00
Pierre Goiffon
c3915ee48e
N°2518 Implementation to rotate logs on a weekly basis
2019-10-08 08:42:41 +02:00
Pierre Goiffon
21ff03e28f
N°2518 Possibiliy to rotate log files based on days
...
See the 'log_filename_builder_impl' config parameter
2019-10-08 08:42:41 +02:00
Pierre Goiffon
2c8887398d
🎨 Log classes : PHPDoc & fix wrong self:: uses
2019-10-08 08:42:41 +02:00
Romain Quetiez
38c12104b3
N.740 Error when attempting to disable the logs. Took the opportunity to refactor, relying on late static bindings (requires PHP 5.3). The refactoring avoided the fix to be duplicated in three places.
...
SVN:trunk[4628]
2017-03-29 08:28:24 +00:00
Denis Flaven
fa94dd257a
File-based "transactions" dans log files better protected against concurrent access...
...
SVN:trunk[3659]
2015-07-28 12:51:46 +00:00
Romain Quetiez
721faa7e1e
Updated copyright (2012) and license (LGPL changed to AGPL)
...
SVN:trunk[2333]
2012-10-23 21:41:36 +00:00
Romain Quetiez
21722b9e80
Internal: added an API for logging tools events
...
SVN:trunk[1026]
2010-12-10 15:19:18 +00:00
Romain Quetiez
a0e0371812
#19 - Reviewed the licensing information and started to align the comments in the code
...
SVN:trunk[422]
2010-05-24 09:24:35 +00:00
Romain Quetiez
d527b56340
#74 Added the configuration of logging (errors, web service usage, etc.), and improved a little the error logging (both in a file and into the database + new format for additional information such as the callstack)
...
SVN:trunk[403]
2010-05-13 20:40:52 +00:00