Giter VIP home page Giter VIP logo

log's People

Contributors

jabielecki avatar ncruces avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

embrosa

log's Issues

Feature request: Allow reporting errors

This may be out of scope, but I think it would be useful to report errors via a new method, like Report or something.
Especially because the error detection for Go does not seem to work (compared to e.g. NodeJS) – it logs panics but usually does not report them to error reporting automatically.

Some info:
https://cloud.google.com/error-reporting/docs/formatting-error-messages
json @type needs to be type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/golangci-lint.yml
  • actions/checkout v4
  • golangci/golangci-lint-action v4
.github/workflows/gotest.yml
  • actions/setup-go v5
  • actions/checkout v4
  • actions/setup-go v5
  • actions/checkout v4
  • actions/setup-go v5
  • actions/checkout v4
  • actions/setup-go v5
  • actions/checkout v4
  • ubuntu 22.04
gomod
go.mod
  • go 1.11

  • Check this box to trigger a request for Renovate to run again on this repository

Feature request: improve logging UX locally

This may be out of scope, but I was thinking if the logs could maybe render more beautiful locally. Instead of this, which looks not very readable:

{"message":"asdf","severity":"CRITICAL","Field":"sup"}
{"message":"asdf","severity":"INFO"}
{"message":"asdf","severity":"ERROR"}
{"message":"asdf","severity":"ALERT"}

First, it would be nice if locally there would be no escape characters displayed:

image

Second, I am thinking if this would be more useful to log locally (one could check if some env var is set, like an automatically set in cloud run /k8s or a custom one):

⚠️ asdf
❌ asdf
❗ asdf { "Field": "sup" }

reverse the stdlib default of escaping `&` as `\u0026` inside JSON

The stdlib defaults to escaping some chars inside JSON, not for any JSON-related reasons, but to protect... HTML? Huh.

Better to disable it:

package main

import (
  "fmt"
  "encoding/json"
  "bytes"
)

func main() {
  data := "x < y"
  
  raw,_ := json.Marshal(data)
  fmt.Println(string(raw))
  //prints: "x \u003c y" <- probably not what you expected
  
  var b1 bytes.Buffer
  json.NewEncoder(&b1).Encode(data)
  fmt.Println(b1.String())
  //prints: "x \u003c y" <- probably not what you expected
  
  var b2 bytes.Buffer
  enc := json.NewEncoder(&b2)
  enc.SetEscapeHTML(false)
  enc.Encode(data)
  fmt.Println(b2.String())
  //prints: "x < y" <- looks better
}

[perennial] match the CI versions with the official GCP versions

Visit https://cloud.google.com/functions/docs/concepts/go-runtime and see what OS and Go versions they use. This might change over time, but this library should be tested to work against the very same versions. Verify if the versions match the contents of .github/workflows/gotest.yml under the section gcp_cloud_functions_exact, because this is what is continuously tested during development.

Leave a comment in this issue saying if the version match (yes/no), but do not close the issue; this task is perennial 😒 If the versions do not match, the yml needs an update. Please create such update as a normal pull request against the master branch.

Google Error Reporting

Thanks a lot for this package.

I have a question tho, what do I have to do so that errors are reported to Google Error Reporting? It seems like the stacktrace is missing for that, but I may be wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.