Isaac Connor
4f0f2224b2
Restructure code around build where part of sql, add specific filters for level, StartDateTime and EndDateTime.
2022-10-25 12:49:08 -04:00
Isaac Connor
de2866f957
Check value of System:Edit permission and ZM_LOG_INJECT to disable ajax log injection.
2022-10-06 14:51:29 -04:00
Isaac Connor
d289eb4860
File must be escaped as well to prevent XSS
2022-09-30 09:57:35 -04:00
Isaac Connor
852b67bf21
Don't call format on an empty string and only pass the integer part of it
2022-08-10 17:58:11 -04:00
Isaac Connor
c18a5e422a
Rework code to be smaller. Don't require SystemView permission to post a log entry. Default to ERR if invalid err code provided instead of PANIC so that the log entry still gets saved
2022-08-10 09:18:39 -04:00
Isaac Connor
d135be17ba
Must pass time() to format()
2022-06-03 14:25:19 -04:00
Isaac Connor
b4d5029884
Use dateTimeFOrmatter to format the date/time on logs
2022-06-01 15:42:44 -04:00
Isaac Connor
7743445323
Handle when there isn't a server Id
2021-03-22 21:30:56 -04:00
Isaac Connor
f306febb5f
use find_one when loading Server which can use caching
2021-03-22 17:49:59 -04:00
Andrew Bauer
c166b0de0f
fix return too soon when no log results
2021-01-02 16:33:56 -06:00
Isaac Connor
52c7cc5869
reorganize code. Remove Server caching as it is done in Object.php.
2020-11-11 11:49:44 -05:00
Isaac Connor
4c791b390f
fix warning due to undefined vars being used
2020-10-26 09:59:15 -04:00
Andrew Bauer
d117e993ad
add create task to ajax/log.php
2020-10-22 10:17:34 -05:00
Isaac Connor
4a0ada5335
improve logging of invalid task in ajax/log
2020-10-22 08:52:54 -04:00
Andrew Bauer
97d05c2f88
move newlog ajax request to log
2020-10-18 07:20:59 -05:00
Isaac Connor
10c0a6617c
Return Debug to a regular function to match other logging functions. Since we switched to using namespaces we no longer clash with cake_php.
2020-10-14 10:39:25 -04:00
Isaac Connor
96474a7d94
Fix case on Servers. Turn off error reporting so that mkdir(ZM_DIR_EXPORTS) doesn't generate a warning. Fix server column in xml output
2020-09-21 13:00:03 -04:00
Isaac Connor
59f9f37fff
cleanup. Don't output errors that break json response
2020-04-23 11:06:41 -04:00
Isaac Connor
fc017893bc
Sort the log filtering options. Fixes #2756
2019-12-20 16:09:34 -05:00
Isaac Connor
c7f5673b47
Make filterFIelds global and give more info in error message
2019-10-09 10:30:40 -04:00
Isaac Connor
e4b5052fb4
Add delete from logs ajax capability. Make the clear button use it. Fixes #2620
2019-10-02 15:39:04 -04:00
Isaac Connor
520bd4e7a7
Add ZM namespace to Logger
2019-03-01 14:42:05 -05:00
Isaac Connor
8dd8888975
Php namespace ( #2537 )
...
* experiment with namespaces on the Server class
* experiment with namespaces on the Server class
* Implement the ZM namespace on objects
* Implement the ZM namespace on objects
* Implement the ZM namespace on objects
2019-02-22 09:19:07 -05:00
Matthew Noorenberghe
c8e41bfee7
log.php: Ensure 'line' is an integer. Helps with #2466
2019-02-10 00:10:39 -08:00
Matt N
f0b33145f5
Log CSP violations in ZM logs in supported browsers ( #2431 )
2019-01-21 11:12:17 -05:00
Isaac Connor
abeafe9ba6
fix log export. minTime and maxTime were being cleared by the regexp to detect sub second time. Also use ZM_DIR_EXPORTS instead of ZM_PATH_SWAP
2018-11-12 15:43:03 -05:00
Isaac Connor
534aebb21f
When loading previous and subsequent log lines, merge the fields in the filters instead of replacing
2018-09-09 16:36:09 -04:00
Isaac Connor
dfdac2ed70
make find and find_one functions consistent across Objects
2018-09-07 16:31:11 -04:00
Isaac Connor
24f8d63b69
comment out a debug line
2018-08-20 11:13:38 -04:00
Isaac Connor
871e3807e6
Merge branch 'master' of github.com:ZoneMinder/ZoneMinder
2018-08-17 12:57:27 -04:00
Isaac Connor
25703fb2d4
Speed up log query response by generating the options out of the log rows instead of hitting the db again.
2018-05-18 09:05:25 -04:00
Isaac Connor
148d7066f9
Merge branch 'master' into storageareas
2017-07-11 16:15:02 -04:00
Isaac Connor
50adec45c5
Strip non 7-bit ascii chars from log message
2017-07-06 11:45:17 -04:00
Isaac Connor
c2a042c0e7
replace with $)REQUEST so that logs can be query using a GET. Strip non-asci8bit chars from log message
2017-07-06 11:42:04 -04:00
Isaac Connor
9135da92ed
fix typo fileFields => filterFields
2017-01-31 21:33:43 -05:00
Isaac Connor
ad157cf21c
fix tabs
2016-12-14 14:56:54 -05:00
Isaac Connor
7c84e2417d
remove extra ?
2016-12-08 15:53:38 -05:00
Isaac Connor
c8009baf3f
fix missing ; and test for integer string in limit
2016-12-08 15:46:42 -05:00
Isaac Connor
587fd16aa6
Add testing for limit, sortField and all the filters to ensure that they are valid.
2016-12-08 13:31:44 -05:00
Steve Gilvarry
f804f7739d
Adjust download file path to swap path to match the file generated.
2016-06-14 20:49:38 +10:00
Isaac Connor
bd71c4999d
test for Server in servers_by_Id as well as just having a value for ServerId. Fixup export as well.
2016-01-02 14:36:37 -05:00
Isaac Connor
cf7e168872
Fix populating the server filter and then fix filtering by server. Also introduce robustness and consolel ogging when a filter doesn't exist
2016-01-01 17:10:37 -05:00
Isaac Connor
ec7504f925
Translate ServerId to Server in Log record before sending back
2016-01-01 16:33:28 -05:00
Isaac Connor
bfe4175fdf
Add Server to filters and log results
2015-12-31 10:13:25 -05:00
Andrew Bauer
3a94712db2
add translate function
2015-05-10 08:10:30 -05:00
Isaac Connor
3f64f9d919
Make the log export use ZM_PATH_SWAP and report the full path on error
2015-01-03 15:16:19 -05:00
Isaac Connor
ebe35c2135
handle empty [file] to prevent logzilla
2014-11-13 09:17:54 -05:00
Isaac Connor
bec58a6011
fixes WRT to db logging. I believe fixes issue #504
2014-09-26 14:43:58 -04:00
stevegilvarry
61cf067be0
Wrap sort order. Fixes #450
2014-06-29 22:09:59 +10:00
Isaac Connor
969918781f
more updates, currently the log updates are not enough. Filtering does not work.
2013-11-13 10:11:16 -05:00