Comments (1)
Hey Ryan,
When I was first learning golang a few years back it was explicitly stated in the documentation that leaving file descriptors open is bad practice. Having an open file locks the file, so any other process that tries to access that file would be locked out until the handler was released.
I don't use Go that much anymore, so I don't know if that has changed, but afaik it's still best practice not to leave a reference to a file open when not actively accessing it.
from lfshook.
Related Issues (20)
- Can you support the archive when the file get too big? HOT 3
- How to hide log from console? HOT 4
- go-file-rotatelogs exampled out of date HOT 1
- case-insensitive import
- build problem HOT 1
- In Example Log.Formatter is useless HOT 1
- Formatting broken for non-TextFormatter formatters (PR7 reverted) HOT 3
- Use of "v" in version tag to support gopkg.in HOT 3
- All tags point to the same commit HOT 2
- Can't create log files in JSON format HOT 4
- README need to be updated HOT 1
- A mistake HOT 2
- Failed to fire hook HOT 1
- Example HOT 1
- Log accordingly to a field, is there possible ? HOT 1
- panic: runtime error: slice bounds out of range HOT 2
- New Trace log level in logrus HOT 1
- Change log file name dynamically HOT 1
- How often the files are closed? HOT 2
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 lfshook.