Comments (6)
Got it, I will fix it before tomorrow.
from slf4go.
@ms-clovis I have fix this issue in version v1.0.4
.
slf4go
don't use github.com/go-eden/etime
and github.com/huandu/go-tls
anymore, now it only requires github.com/go-eden/common
, which is maintained by myself.
You could run go get -u -t ./...
to update versions, after that the go.mod
should like:
require (
......
github.com/go-eden/slf4go v1.0.4
)
from slf4go.
Thank you for your prompt attention. I am still getting the following (as part of common)
github.com/go-eden/common/etime
C:\Go_Projs\pkg\mod\github.com\go-eden\[email protected]\etime\etime_now.go:23:20: invalid operation: tv.Sec * 1000 + int64(tv.Usec) / 1000 (mismatched types int32 and int64)
C:\Go_Projs\pkg\mod\github.com\go-eden\[email protected]\etime\etime_now.go:32:20: invalid operation: tv.Sec * 1e+06 + int64(tv.Usec) (mismatched types int32 and int64)
from slf4go.
These are the changes necessary in etime_now.go:
func NowMillisecond() int64 {
var tv syscall.Timeval
if err := syscall.Gettimeofday(&tv); err != nil {
return time.Now().UnixNano() / 1e6
}
return int64(tv.Sec*1e3) + int64(tv.Usec)/1e3
}
// NowMicrosecond obtains the current microsecond, use syscall for better performance
func NowMicrosecond() int64 {
var tv syscall.Timeval
if err := syscall.Gettimeofday(&tv); err != nil {
return time.Now().UnixNano() / 1e3
}
return int64(tv.Sec*1e6) + int64(tv.Usec)
}
from slf4go.
OK... now I find the reason.
In linux and osx, the datatype of syscall.Timeval.Sec
is int64
, but in windows, it is int32
, this is really unexpected...
I have commit it into the new release v1.0.5
, you could try it.
Thank you for all.
from slf4go.
Thank you for your time
from slf4go.
Related Issues (7)
- combine slf4go and zap? HOT 3
- Possible typo in fatal logger name HOT 2
- No method available to add Fields to existing globalLogger variable HOT 6
- Default example does not work on version 1.0.9 HOT 1
- Allow to store and retrieve logger in `context.Context` object
- Go 1.20+: relocation target type.runtime.g not defined
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 slf4go.