Commit Graph

144 Commits

Author SHA1 Message Date
Warren Buckley
964dd0374d Makes SavedSearches Get, Add & Delete methods virtual - as you may only want to implement the GetLogs but NOT the GetSavedSearch method for example 2018-09-24 13:12:30 +01:00
Warren Buckley
23245a578a Merge remote-tracking branch 'origin/temp8' into temp8-logviewer 2018-09-20 11:03:38 +01:00
Warren Buckley
2ed048e4e1 Improves logic for single word search to use Message Like expression - Thanks Dan Booth
Co-authored-by: Dan Booth <dan@diplo.co.uk>
Co-authored-by: Warren Buckley <warren@umbraco.com>
2018-09-19 21:22:10 +01:00
Warren Buckley
9f5fe7ddfe Adds some logic if we get 0 results back and the search expression contains no spaces (we retry with a message like filter)
Moves some of the logic into methods - as we end up reusing it
2018-09-18 21:50:31 +01:00
Warren Buckley
2f9459f296 Adds in functionality to remove items from the saved searches - Thanks Dan Booth
Co-authored-by: Dan Booth <dan@diplo.co.uk>
Co-authored-by: Warren Buckley <warren@umbraco.com>
2018-09-14 15:17:12 +01:00
Warren Buckley
8bad44782b Move logic from the HttpRequestIdEnricher into our own class so its not coupled to Serilog when attempting to get ReqId in UmbracoModule start & end log requests 2018-09-14 14:44:00 +01:00
Warren Buckley
57a7cf3903 We can now save a query to the JSON file on disk now - for our cheap persistence layer 2018-09-12 16:14:42 +01:00
Warren Buckley
0933443cb3 Adds in new API endpoint that get the saved search - our default implmentation gets them from a JSON file off disk
* If the API call fails then we load in some defaults
* The GetSavedSearches is Abstract so along with the GetLogs the GetSavedSearches could be custom implemented if it needed to come from a DB or some other location for dev's needs
2018-09-12 11:35:51 +01:00
Warren Buckley
c3cfee7b2c Need to use the EscapleLikeExpression method instead for the fallback check 2018-09-12 11:33:19 +01:00
Warren Buckley
d38e4a0442 Adds in fallback logic to do a search on @Message which is the rendered message template along with a SQL like. Thanks Diplo aka Dan Booth
@Message like '%find me%'
2018-09-11 15:06:35 +01:00
Warren Buckley
64384dc8b3 Merge remote-tracking branch 'origin/temp8-MOAR-LOGGING' into temp8-logviewer 2018-09-10 10:31:16 +01:00
Warren Buckley
8cd28a62ea Rename CommonLogMessage to LogTemplate 2018-09-10 09:40:21 +01:00
Warren Buckley
c403df1990 Update to Common Log Messages - it now returns all unique message templates and their counts
In the UI we display the total count of unique but use LimitTo AngularJS filter to continue to display 10 items
Returning all items so that we have a way to show the next 10 items or similar
2018-09-07 21:43:44 +01:00
Warren Buckley
4184b277aa Reduce the number of different properties, for the timing based logs for the duration in milliseconds to be consistently called 'Duration' 2018-09-06 20:38:03 +01:00
Warren Buckley
a825dd1b92 Configures the default logging pipeline to use the new enrichers 2018-09-06 20:35:02 +01:00
Warren Buckley
d27b4cce09 Adds a few most useful enrichers from the Serilog.Classic.Web project (we dont want all thex extra bloat such as handlers etc) 2018-09-06 20:20:24 +01:00
Warren Buckley
cd20348be5 Move Log4NetLevelMapper enricher into seperate folder - as we plan to add more 2018-09-06 20:19:32 +01:00
Warren
96d76c211c Adds in support for log level filtering - rather than using expressions 2018-09-03 21:29:13 +01:00
Stephan
34fb19ac76 Merge remote-tracking branch 'origin/temp8' into temp8-nuget-pkgs 2018-09-03 17:24:58 +02:00
Warren
20cf8a7637 Create a base class - so we can have the GetLogs implemented by 3rd party devs. Say from Azure Table Storage for example 2018-08-31 21:57:51 +01:00
Stephan
4a32eebb0b Cleanup logging 2018-08-30 19:08:55 +02:00
Warren
c3fa12be6e Exception needs to be a string as Serilog cant easily convert JSON serialised EX back to proper exceptions so we call ToString on it instead 2018-08-30 16:24:34 +01:00
Stephan
069c42ef36 Ensure all ILogger impl support message templates 2018-08-30 10:48:27 +02:00
Warren
e4c7609675 Fixes paging and uses the same Serilog Expression filtering when setting up loggers to query the same LogEvents loaded into memory
* StartsWith(SourceContext, 'Umbraco.Core')
* StartsWith(SourceContext, 'Umbraco.Core') and @MessageTemplate='[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'
* @MessageTemplate='[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)' and TimingDuration > 1000
2018-08-29 19:11:20 +01:00
Warren
fcf8290df9 Update WebAPI method for GetLogs so that we can test out some Expression filter queries in POSTMAN 2018-08-29 18:37:37 +01:00
Stephan
9e07bf0948 Improve ILogger documentation 2018-08-29 09:12:14 +02:00
Warren
424ae7bb91 WIP to open a range of log files 2018-08-28 21:12:38 +01:00
Warren
4ce33c4e3d Updates signature with start/end date and prep for returning paginated logs items 2018-08-28 18:30:58 +01:00
Shannon
029eff1f8a Some refactoring to decouple web based assemblies from Umbraco.Core and move whatever we can to Umbraco.Web where web based assemblies are used. Decouples System.Drawing entirely from Umbraco.Core and removes the Active Directory dependency from Umbraco.core. 2018-08-29 01:15:46 +10:00
Warren
152ddbd252 Adds LogViewerComponent & registers singleton in DI (3rd party devs will have to disable this component & register their own implementation)
Get some more of the basic WebAPI stubs fleshed out to get some data to start using in the UI layer
2018-08-28 14:48:54 +01:00
Warren
3e75c69f10 Merge branch 'temp8-serilog' into temp8-logviewer 2018-08-28 11:27:11 +01:00
Warren
34452e72c0 Adds the shared option to the File sink to avoid file locking & if app restarts we don't get _001 or _002 files etc 2018-08-28 09:46:51 +01:00
Shannon
94cbe3b1b8 updates timing id 2018-08-28 15:40:20 +10:00
Shannon
6506abd451 Simplifies logger calls to proxy all calls to a single method of it's type 2018-08-28 15:38:36 +10:00
Shannon
8d6e297c37 Adds additional Fatal methods to match Error and move Fatal code above error so all logger code goes from Fatal -> Verbose 2018-08-28 15:24:45 +10:00
Warren
cae468eaeb Some rough untested POC code to read JSON log file from disk 2018-08-27 20:05:17 +01:00
Warren
24f91f1917 Adds in Error without ex for just a message and a message template with params 2018-08-23 14:43:38 +01:00
Warren
afebd88d45 Update ImageProcessorLogger - to use the new Error logger method that contains only an ex - and under the hood it will pass on an empty string to the message 2018-08-23 12:26:33 +01:00
Warren
0c9ac7fa45 Make Log4NetLevel enricher internal - no need for it to be public 2018-08-23 12:16:43 +01:00
Warren
66e4e1f0f4 Adds new method to ILogger for taking only the exception - NOTE will add an empty string for the message 2018-08-23 12:14:07 +01:00
Warren
3baf5697e4 Add in MachineName as a Serilog property 2018-08-21 12:48:06 +01:00
Warren
9e996c68bb Refactored the error params, so that exception is before the message/template so its more in sync with Serilog signature & was an easy way to find some more logs I missed too 2018-08-17 15:41:58 +01:00
Warren
38984181fc Adds the Fatal Logger Extension method <T> 2018-08-17 11:38:31 +01:00
Warren
a020d60f3e Adds in new log level from Serilog to our Umbraco ILogger - Fatal (Worse than Error) 2018-08-17 11:26:22 +01:00
Warren
ce4a19a20a Update OWIN logger with message template properties - mostly used for user X logged in (however we can't log those messages with properties) :( 2018-08-16 15:24:45 +01:00
Warren
47c8651609 Update more logging messages to use templates as opposed to string formats that were using the LoggerExtensions <T> 2018-08-16 12:00:12 +01:00
Warren
7f53786461 Sets the default text file logger to be debug only & for the JSON file to log verbose 2018-08-15 17:43:20 +01:00
Warren
93a69d89e8 Add in optional params for the Serilog LoggerConfig Extension methods, to control number of days to keep and the log level to use 2018-08-15 16:58:23 +01:00
Warren
e76d35e2ff * Removes the unused func methods from Logger & DebugDiagnosticsLogger
* Adds in new Verbose logging level
2018-08-15 16:39:35 +01:00
Warren
95c5817e1e Removes the logging Func from Interface AND updates the only usages
* UmbracoExamineindexer
* The extension method <T> wrappers
2018-08-15 15:21:27 +01:00