- 5bf006d: Create a child method to allow for creating new loggers with existing options
- Updated dependencies [5bf006d]
- @ogma/[email protected]
- 48dbd4d: Explicitly set the styler type
- e940f93: The
@ogma/styler
instance is now exposed at the.style
property of ogma
- Updated dependencies [e940f93]
- @ogma/[email protected]
- 02cd763: Upgrade reflect-metadata to v0.2.1 and update peer dependency range
- 99b3be9: OgmaService properly returns the OgmaService instance when changing the log level, insterad of the underkying Ogma class instance
- Updated dependencies [6cd729d]
- @ogma/[email protected]
- 1ec5683: Properly handle observable and promise errors for the @Log() decorator
- 18c0d5f: Update the service options provider to correctly pass on the options to the ogma creation process
- Updated dependencies [743cf48]
- @ogma/[email protected]
- 15b6f6f: Allow the log level to be changed during runtime
- Updated dependencies [15b6f6f]
- @ogma/[email protected]
- c970428: Warn if there are multiple parsers installed of the same type
-
36ff6d0: New parser format and module options
With the new version, there is no longer a need toseparate the service and interceptor options.As such, the options passed to the module are now the same as those passed to
Ogma
directly plus atraceMethod
property for the@Log()
decorator.As for the parsers that were originally passed to
interceptor.[type]
, they should now be registered directly as providers so that the discovery service can find them on application start.Add the
@Parser()
decorator to your parser and pass in the context in which it should be called. This should match whatcontext.getType()
orhost.getType()
returns
- 84c799f: Update
@ogma/styler
to 2.0.0
- Updated dependencies [fa89834]
- @ogma/[email protected]
- 7ce391c: chore(deps): fix peer dependency typo in nestjs-module
- dd5215e: Security updates of dependencies. Should be nothing major here.
- Updated dependencies [dd5215e]
- @ogma/[email protected]
-
33c279b: Fix dependencies for better install experience
@ogma/common
and@ogma/styler
were set as peerDependencies instead of dependencies meaning package managers wouldn't install them by default. They are now properly set as dependencies@ogma/logger
was set as a peerDependency instead of a dependency. Now has been set to a dependency. -
Updated dependencies [33c279b]
- @ogma/[email protected]
- a4a01af: Fixed the published peer dependencies of each package
-
4327443: Allow for logging out the response body as well
While technically this is a breaking change in the
getContextSuccessString
method, passing the data object instead of the buffer length, to my knowledge there are no custom parsers out there that make use of this method and all@ogma/*
parsers have been checked that no changes are necessary for them. If this does end up breaking something for someone, I'm sorry.
-
2e65080: Update {each: true } to separate via space, not newline
- 2f5ccce: Allow for printing of each array value
- 6f7b8cb: fix: add
application
property inOgmaServiceMeta
-
e82c80b: NestJS v9 Support
- Use the new
ConfigurableModuleBuilder
from@nestjs/common@9
- Support Fastify v4
- As a side effect,
@ogma/platform-graphql-fastify
can only be used with@nestjs/mercurius
untilapollo-server-fastify
supports v4
- As a side effect,
Run your preferred pacakge manager's method of ugrading. There's no code chagnes necessary to the ogma imports, but implications of underlying packages that should be taken into consideration
- Use the new
- a674a96: fix defect in @Log decorator that produces an error when the original function was called
- 828ad94: made determineStatusCodeFromError protected (instead of private) to be able to override it in child classes
- 50f7664: Add peer dependencie on
@ogma/logger
for@ogma/nestjs-module
and set up peerDependenciesMeta for better package manager integration
- 43e2854: Updated the doc string for the
OgmaService
log methods
-
d97af0e: Add @Log() and @LogAll() decorators to allow for automatic method timing
- d0217ad: patch: remove extra blank line print from
printError
.
- 384fc2b: Extra metadata can now be logged in interceptors by using a custom parser and the
getMeta
method
- 329f92a: Set the main file in the package.json correctly based on the proper publish method
-
5e51fdc: Update package versions to work with Nest v8
For
@ogma/nestjs-module
and all of the@ogma/platform-*
packages, Nest v8 is the supported package version. Nest v7 may still continue to work, but has no guarantees. Also, RxJS is upgraded to v7 to stay inline with Nest's expectations.To stay current with Nest.
Upgrade with Nest v8. There shouldn't be any breaking underlying changes, but you can never be too careful with coded upgrades.
- Updated dependencies [90d2d53]
- @ogma/[email protected]
- Updated dependencies [85fd2f4]
- @ogma/[email protected]
-
8bea02f: Release of
@ogma/common
and@ogma/styler
. Upgrade@ogma/nestjs-module
to be 100% compatible with Nest's logger@ogma/logger
now depends on@ogma/common
and@ogma/styler
for types and string styling, instead of managing it on its own@ogma/nestjs-module
now acceptstrace
as the second parameter toerror
instead ofcontext
.meta
can still be passed as a second parameter too or it can be a third parameter.@ogma/logger
now sets anool
property when logging in JSON mode to accommodate when using a custom log map@ogma/logger
no longer needs thestream
property to have ahasColor
function@ogma/cli
now reads from theool
property insteadlevel
to allow writing back to Ogma's standard format
@ogma/logger
now correctly logs Error objects the same wayprocess.stdout
does instead of logging{}
@ogma/logger
can accept alevelMap
property for custom level mapping@ogma/logger
'sstream
option can now have agetColorDepth
property method, but it is not necessary
I wanted to be able to have full control over string styles and this gave me a great chance to learn about SGRs and how they work. Along with that, this gave me the perfect opportunity to make some changes to the logger to be more compliant with Nest's logger and have better compatibility with it.
I tried to make this is painless as possible in terms of breaking changes. For the most part, you should just be able to upgrade with no problems. If you have a stream with
hasColor
you will need to remove that method. You may want to add in thegetColorDepth
method, but can also just useFORCE_COLOR
if necessary.
- Updated dependencies [8bea02f]
- @ogma/[email protected]
- @ogma/[email protected]
- @ogma/[email protected]
-
bbf66f6: Major release of @ogma
The
ogma
command has been moved from@ogma/logger
to@ogma/cli
. There are no other breaking changes. This change was made to keep the package size as small as possible and to keep the code clean and maintainable.
- Updated dependencies [bbf66f6]
- @ogma/[email protected]
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
0.4.3 (2020-10-30)
0.4.2 (2020-10-26)
Note: Version bump only for package @ogma/nestjs-module
0.4.1 (2020-10-25)
- service: fixes logger methods to follow
LoggerService
interface (f1fd191)
0.4.0 (2020-10-25)
- all: log methods now take an object as the second parameter instead of having 3 extra optional parameters
0.3.1 (2020-09-12)
- module: adds a
forFeatures
method to the module (e7f5df1)
0.3.0 (2020-09-05)
- module: add requestId check to printMessage (97bcda7)
- all: add request id generation and log (00fd8c7)
- module: remove registration of global interceptor (fdf5ef7)
0.2.2 (2020-08-10)
Note: Version bump only for package @ogma/nestjs-module
0.2.1 (2020-07-25)
- module: adds export for
createProviderToken
(9b0b43f)
0.2.0 (2020-07-20)
Note: Version bump only for package @ogma/nestjs-module
0.1.2 (2020-07-18)
- module: updates decorators type to accept a class (1bc3df7)
0.1.1 (2020-07-18)
- gql: updates gql types to work with apollo > 2.11 (a097842)
0.1.0 (2020-04-20)
- interceptor: adds case to skip over graphql subscriptions (1e35310)