Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: appengine/logdog/coordinator/endpoints/logs/get.go

Issue 1909943003: LogDog: Add project support to Storage. (Closed) Base URL: https://github.com/luci/luci-go@logdog-project-coordinator-services
Patch Set: Rebase? Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | server/logdog/storage/archive/storage.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package logs 5 package logs
6 6
7 import ( 7 import (
8 "net/url" 8 "net/url"
9 "time" 9 "time"
10 10
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 }.Errorf(c, "Failed to execute range request.") 282 }.Errorf(c, "Failed to execute range request.")
283 return nil, err 283 return nil, err
284 } 284 }
285 285
286 return logs, nil 286 return logs, nil
287 } 287 }
288 288
289 func getTail(c context.Context, st storage.Storage, p types.StreamPath) ([][]byt e, error) { 289 func getTail(c context.Context, st storage.Storage, p types.StreamPath) ([][]byt e, error) {
290 var data []byte 290 var data []byte
291 err := retry.Retry(c, retry.TransientOnly(retry.Default), func() (err er ror) { 291 err := retry.Retry(c, retry.TransientOnly(retry.Default), func() (err er ror) {
292 » » data, _, err = st.Tail(p) 292 » » data, _, err = st.Tail("", p)
293 return 293 return
294 }, func(err error, delay time.Duration) { 294 }, func(err error, delay time.Duration) {
295 log.Fields{ 295 log.Fields{
296 log.ErrorKey: err, 296 log.ErrorKey: err,
297 "delay": delay, 297 "delay": delay,
298 }.Warningf(c, "Transient error while fetching tail log; retrying .") 298 }.Warningf(c, "Transient error while fetching tail log; retrying .")
299 }) 299 })
300 if err != nil { 300 if err != nil {
301 log.WithError(err).Errorf(c, "Failed to fetch tail log.") 301 log.WithError(err).Errorf(c, "Failed to fetch tail log.")
302 return nil, err 302 return nil, err
303 } 303 }
304 return [][]byte{data}, err 304 return [][]byte{data}, err
305 } 305 }
OLDNEW
« no previous file with comments | « no previous file | server/logdog/storage/archive/storage.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698