Comments (4)
Hi @akajla09 I would like to contribute on this.
My proposed solution would be to change log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
in config.go
to log.With().Caller().Logger().Output(zerolog.ConsoleWriter{Out: os.Stderr})
.
Let me know what you think about this.
PS: Thanks
from warrant.
Hi @AKARSHITJOSHI - thanks for offering to help. I haven't looked into this deeply so can't say for certain if this change will work. Have you tried it locally and tested it out? If you have a sample log output from the change, we can look at it to see if it contains the full filepath.
from warrant.
Please have a look at the following image
Message :
{"level":"fatal","error":"While parsing config: yaml: invalid trailing UTF-8 octet","time":"2023-04-09T11:05:49+05:30","caller":"/Users/personal/documents/warrant/pkg/config/config.go:88","message":"Error while reading warrant.yaml. Shutting down."}
The caller part is where the entire file path is shown . I tested the mentioned change in config.go
from warrant.
Can you submit a PR for this change? Looks like it does add the caller to error messages which is nice. However, I'm curious if it'll work for errors that are wrapped via Errors.wrap()
(I can check that from your PR)
from warrant.
Related Issues (20)
- Resource timestamps should be generated in code rather than at database level
- List AccessEvent endpoint doesn't support wildcards
- Colon in Ids are not supported HOT 2
- Support sync with mongodb HOT 3
- Default db migration behavior should be to use migrations from current source
- Add postgres ci job for PRs and merges HOT 1
- Add ability to attach a "policy" to warrants to support attribute based access control (ABAC)
- Add support for wildcards in the warrant subject
- Update postgres timestamp columns to be type `TIMEZONETZ` to support timezones
- Consider supporting Open Policy Agent Rego as the policy language for warrant policies
- Support persistence and reuse of warrant policies
- Add `expiresIn` built-in function for warrant policies to support time-based / expiring warrants
- Add support for a `now` built-in method for warrant policies
- Add support for 'zookie' protocol as described in Zanzibar spec
- Add support for read replicas when using MySQL or PostgreSQL
- OpenAPI specification for APIs HOT 3
- /v1/query API is missing HOT 3
- Auto-migrate should only run migrations included in the current version
- Support Policies + Context in Query API
- Allow Object Types with Empty Relations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from warrant.