Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for getSource (7.94 sec)

  1. internal/logger/console.go

    	} else {
    		message = fmt.Sprint(args...)
    	}
    	logJSON, err := json.Marshal(&log.Entry{
    		Level:   FatalKind,
    		Message: message,
    		Time:    time.Now().UTC(),
    		Trace:   &log.Trace{Message: message, Source: []string{getSource(6)}},
    	})
    	if err != nil {
    		panic(err)
    	}
    	fmt.Fprintln(Output, string(logJSON))
    	ExitFunc(1)
    }
    
    func (f fatalMsg) quiet(msg string, args ...interface{}) {
    	f.pretty(msg, args...)
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:57:52 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  2. cmd/namespace-lock.go

    	opsID   string
    }
    
    // Lock - block until write lock is taken or timeout has occurred.
    func (di *distLockInstance) GetLock(ctx context.Context, timeout *dynamicTimeout) (LockContext, error) {
    	lockSource := getSource(2)
    	start := UTCNow()
    
    	newCtx, cancel := context.WithCancel(ctx)
    	if !di.rwMutex.GetLock(newCtx, cancel, di.opsID, lockSource, dsync.Options{
    		Timeout:       timeout.Timeout(),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  3. cmd/namespace-lock_test.go

    // Tests getSource().
    func TestGetSource(t *testing.T) {
    	currentSource := func() string { return getSource(2) }
    	gotSource := currentSource()
    	// Hard coded line number, 35, in the "expectedSource" value
    	expectedSource := "[namespace-lock_test.go:35:TestGetSource()]"
    	if gotSource != expectedSource {
    		t.Errorf("expected : %s, got : %s", expectedSource, gotSource)
    	}
    }
    
    // Test lock race
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 3.1K bytes
    - Viewed (0)
  4. cmd/bucket-lifecycle.go

    		TraceType: madmin.TraceILM,
    		Time:      startTime,
    		NodeName:  globalLocalNodeName,
    		FuncName:  event,
    		Duration:  duration,
    		Path:      pathJoin(oi.Bucket, oi.Name),
    		Error:     "",
    		Message:   getSource(4),
    		Custom:    map[string]string{"version-id": oi.VersionID},
    	}
    }
    
    func (sys *LifecycleSys) trace(oi ObjectInfo) func(event string) {
    	startTime := time.Now()
    	return func(event string) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  5. cmd/sftp-server-driver.go

    		Duration:  time.Since(startTime),
    		Path:      s.Filepath,
    		Error:     errStr,
    	}
    }
    
    func (m *sftpMetrics) log(s *sftp.Request, user string) func(err error) {
    	startTime := time.Now()
    	source := getSource(2)
    	return func(err error) {
    		globalTrace.Publish(sftpTrace(s, startTime, source, user, err))
    	}
    }
    
    // NewSFTPDriver initializes sftp.Handlers implementation of following interfaces
    //
    // - sftp.Fileread
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  6. cmd/ftp-server-driver.go

    		Duration:  time.Since(startTime),
    		Path:      objPath,
    		Error:     errStr,
    	}
    }
    
    func (m *ftpMetrics) log(s *ftp.Context, paths ...string) func(err error) {
    	startTime := time.Now()
    	source := getSource(2)
    	return func(err error) {
    		globalTrace.Publish(ftpTrace(s, startTime, source, strings.Join(paths, " "), err))
    	}
    }
    
    // Stat implements ftpDriver
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  7. internal/logger/logger.go

    }
    
    func trimTrace(f string) string {
    	for _, trimString := range trimStrings {
    		f = strings.TrimPrefix(filepath.ToSlash(f), filepath.ToSlash(trimString))
    	}
    	return filepath.FromSlash(f)
    }
    
    func getSource(level int) string {
    	pc, file, lineNumber, ok := runtime.Caller(level)
    	if ok {
    		// Clean up the common prefixes
    		file = trimTrace(file)
    		_, funcName := filepath.Split(runtime.FuncForPC(pc).Name())
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  8. cmd/server-main.go

    func bootstrapTraceMsg(msg string) {
    	info := madmin.TraceInfo{
    		TraceType: madmin.TraceBootstrap,
    		Time:      UTCNow(),
    		NodeName:  globalLocalNodeName,
    		FuncName:  "BOOTSTRAP",
    		Message:   fmt.Sprintf("%s %s", getSource(2), msg),
    	}
    	globalBootstrapTracer.Record(info)
    
    	if serverDebugLog {
    		fmt.Println(time.Now().Round(time.Millisecond).Format(time.RFC3339), " bootstrap: ", msg)
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 15:54:03 GMT 2024
    - 34.9K bytes
    - Viewed (1)
Back to top