Giter Club home page Giter Club logo

Comments (3)

ganeshnj avatar ganeshnj commented on June 2, 2024 2

I still don't understand fully the relationship between the Logs and the Logger.

Logs struct is simply used for namespacing, I would have preferred Logs as empty enum to make is obvious because you can't instantiate enum type itself.

You are on right track, there is full list of instructions provided in the log collection documentation

Essentially

// initialize the SDK
Datadog.initialize(
    with: Datadog.Configuration(
        clientToken: "<client token>",
        env: "<environment>",
        service: "<service name>"
    ), 
    trackingConsent: trackingConsent
)

// Enable logging
Logs.enable()

// Create your logger
let logger = Logger.create(
    with: Logger.Configuration(
        name: "<logger name>",
        networkInfoEnabled: true,
        remoteLogThreshold: .info,
        consoleLogFormat: .shortWith(prefix: "[iOS App] ")
    )
)

from dd-sdk-ios.

plousada avatar plousada commented on June 2, 2024

Hi @Petter-W, you can still find it in the Logs feature Configuration.

from dd-sdk-ios.

Petter-W avatar Petter-W commented on June 2, 2024

Thanks @plousada! I still don't understand fully the relationship between the Logs and the Logger.

Our setup has been pretty simple, we've set up the Datadog core and created a Logger. With 2.0 we should set up the core, enable Logs (Logs.enable) and then create the logger?

from dd-sdk-ios.

Related Issues (20)

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.