mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
* Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
This commit is contained in:
2
vendor/golang.org/x/sys/windows/security_windows.go
generated
vendored
2
vendor/golang.org/x/sys/windows/security_windows.go
generated
vendored
@@ -149,7 +149,7 @@ const (
|
||||
DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = 0x22b
|
||||
DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = 0x22c
|
||||
DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 0x22d
|
||||
DOMAIN_ALIAS_RID_MONITORING_USERS = 0X22e
|
||||
DOMAIN_ALIAS_RID_MONITORING_USERS = 0x22e
|
||||
DOMAIN_ALIAS_RID_LOGGING_USERS = 0x22f
|
||||
DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = 0x230
|
||||
DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = 0x231
|
||||
|
13
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
13
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
@@ -172,6 +172,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error)
|
||||
//sys DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error)
|
||||
//sys WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff]
|
||||
//sys waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff] = WaitForMultipleObjects
|
||||
//sys GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) = GetTempPathW
|
||||
//sys CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error)
|
||||
//sys GetFileType(filehandle Handle) (n uint32, err error)
|
||||
@@ -589,6 +590,18 @@ func LoadSetFileCompletionNotificationModes() error {
|
||||
return procSetFileCompletionNotificationModes.Find()
|
||||
}
|
||||
|
||||
func WaitForMultipleObjects(handles []Handle, waitAll bool, waitMilliseconds uint32) (event uint32, err error) {
|
||||
// Every other win32 array API takes arguments as "pointer, count", except for this function. So we
|
||||
// can't declare it as a usual [] type, because mksyscall will use the opposite order. We therefore
|
||||
// trivially stub this ourselves.
|
||||
|
||||
var handlePtr *Handle
|
||||
if len(handles) > 0 {
|
||||
handlePtr = &handles[0]
|
||||
}
|
||||
return waitForMultipleObjects(uint32(len(handles)), uintptr(unsafe.Pointer(handlePtr)), waitAll, waitMilliseconds)
|
||||
}
|
||||
|
||||
// net api calls
|
||||
|
||||
const socket_error = uintptr(^uint32(0))
|
||||
|
20
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
20
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
@@ -112,6 +112,7 @@ var (
|
||||
procGetProcessTimes = modkernel32.NewProc("GetProcessTimes")
|
||||
procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
|
||||
procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
|
||||
procWaitForMultipleObjects = modkernel32.NewProc("WaitForMultipleObjects")
|
||||
procGetTempPathW = modkernel32.NewProc("GetTempPathW")
|
||||
procCreatePipe = modkernel32.NewProc("CreatePipe")
|
||||
procGetFileType = modkernel32.NewProc("GetFileType")
|
||||
@@ -1084,6 +1085,25 @@ func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32,
|
||||
return
|
||||
}
|
||||
|
||||
func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) {
|
||||
var _p0 uint32
|
||||
if waitAll {
|
||||
_p0 = 1
|
||||
} else {
|
||||
_p0 = 0
|
||||
}
|
||||
r0, _, e1 := syscall.Syscall6(procWaitForMultipleObjects.Addr(), 4, uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds), 0, 0)
|
||||
event = uint32(r0)
|
||||
if event == 0xffffffff {
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
} else {
|
||||
err = syscall.EINVAL
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
|
||||
r0, _, e1 := syscall.Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
|
||||
n = uint32(r0)
|
||||
|
Reference in New Issue
Block a user