All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added serverCallsOutsideNgZone to allow users to perform server calls outside of angular zone (fix #324)
- Added serverCallsBatchSize, serverCallsTimer and flushQueue to allow users to perform server calls in batch (fix #279)
- If you override NGXLoggerServerService, it now optionnaly accepts ngZone in constructor (for serverCallsOutsideNgZone feature)
- If you override NGXLoggerServerService.customiseRequestBody, it now receives
metadata: INGXLoggerMetadata | INGXLoggerMetadata[]
as parameter instead ofmetadata: INGXLoggerMetadata
- Added INGXLogger.partialUpdateConfig that updates only some fields of the config
- Added partialConfig parameter to CustomNGXLoggerService.getNewInstance
- Added context to INGXLoggerConfig, context is written in {} to the log for every log messages
- Added getNewInstance in CustomNGXLoggerService that allows more params for instantiating a new instance of NGXlogger
- Removes the @deprecated on CustomNGXLoggerService
- Added the function alterHttpRequest to allow users to tweak the HttpRequest just before it is sent to the API
- Fix typo in doc (customise.md)
- Makes the DatePipe dependency Optional
- If you use
timestampFormat
, you now need to manually provideDatePipe
from @angular/common- If not provided, this will just display an error when logging, build will not break, your application will still run and logger will still produce an output
- Now correctly secures
message
andadditional
from payload when sending log to server (fixes #286)
- REVERT : testing project is now under main project (this was causing compilation error)
- testing project is now under main project (this was causing compilation error)
- ConfigEngine is not provided in DI anymore, this was causing a bug where all NGXLogger instances share the same config (only the forRoot call would make a NGXLogger instance independant) fixes #282
- Now ConfigEngine is instantiated by the INGXLoggerConfigEngineFactory, the call is made in NGXLogger constructor
- The INGXLoggerConfigEngineFactory is provided in DI if any user wants to tweak this behavior
- Lib is now built with Angular v13
- Lib is now built in ivy compatible mode (fixes #277)
- Added a step in the ServerService that allow users to fully customise the body sent to the API (see example in customise doc)
- HttpClientModule is not needed by default anymore If HttpClientModule is not imported and you use the ServerSide logger, it will log an error If HttpClientModule is not imported and you use the enableSourceMaps, it will log an error
- NGXLogger is now fully customisable, see more in docs
- Column number is now displayed by default in metadata before "... [my-component.ts:15] ..." after "... [my-component.ts:15:10] ..."
- null sent in message will still log something before "this.logger.error(null, myVar)" would not log anything, now it does if you want to come back to the old behavior, you can override INGXLoggerRulesService
- LoggerConfig is renamed to INGXLoggerConfig
- NGXLogInterface is changed to INGXLoggerMetadata
- LoggerColorScheme is renamed to NGXLoggerColorScheme
- NGXMapperService is renamed to INGXLoggerMapperService
- NGXLoggerHttpService is renamed to INGXLoggerServerService
- If server logger fails it now throws an exception instead of logging an error
- LoggerUtils is deleted
- For server side logging : If an error is sent (in message or in additional) then we return the error.stack only. It was done only for message now it is also done for additional.
- NgxLoggerService is not a singleton anymore and respects Angular DI rules (before it was providedIn: 'root')
- CustomNGXLoggerService is now deprecated because the Logger is now fully customisable
- NGXLoggerMonitor is now deprecated, you should use INGXLoggerMonitor instead
- setCustomHttpHeaders is now deprecated, the property is now part of the config
- setCustomParams is now deprecated, the property is now part of the config
- setWithCredentialsOptionValue is now deprecated, the property is now part of the config
NB : those changelogs where not added correctly when the version was published, I reread all the commits to update changelog
Note about version numbers : 4.2.3 was never published (but it was commited) 4.3.1 publish was bugged and was changed for 4.3.2 right after
- NGXLoggerService is now a singleton (used with providedIn: 'root') For information, this change was reverted in 5.x.x so that the lib respects Angular DI rules and you have control on how you want to provide NGXLogger instances
- (internal) Changed the way some internal services were provided
- (internal) e2e project was deleted because it was not used
- Added forChild function to LoggerModule
- Fix for sourcemap parsing in Firefox #227. Thanks @bmtheo
- Fix for logging complex structures (circular) without introducing a new dependency #223. Thanks @bmtheo
- A new option
proxiedSteps
{number} has been introduced. When set to a number, the given number of steps will be ignored in the stacktrace to compute the caller location. If you happen to always see the same location reported in the logs (for example a wrapper service of your own), tune this option to skip this step in the stack traces #192. Thanks @amilor & @bmtheo - New config option
disableFileDetails
(defaults to false). When set totrue
, filename details will not be shown in log messages (#214). Thanks @Raphy - Calling the
debug
endpoint now useconsole.debug
api on the browser (#213). Thanks @bmtheo - Gives direct accesss to current log levels through
level()
andserverLogLevel()
. #215. Thanks @bmtheo
- Fix missing
HttpClientModule
import (#212). Thanks @markterrill - Various dependencies bumps
-
Now in order to display the messages in the debug level you need to enable “verbose” or "debug" mode in the developer tools - console of the browser.
-
Firefox – Enable debug
-
Chrome – Enable verbose
-
Edge – Enable verbose
-
Opera – Enable verbose
- Fixed issues with filename and line number being incorrect
- Now supports custom color schemes for logs (see README)
- Now support custom format timestamps in addition to pre-defined ones in Angular @qortex. Fixes #178.
- Importing mocks and the logger testing module should now be imported from the new testing entrypoint
import {LoggerTestingModule} from 'ngx-logger/testing';