Logo
    Search

    logging

    Explore "logging" with insightful episodes like "Using Diagnostic Observers to Decouple Logging and Observability Code", "JS Fundamentals - Decorators", "Ex-Logger Aims to Beat Elon Musk in Electric Trucks", "From the Vault: Invention of the Chainsaw, Part 1" and "JS One Liners" from podcasts like ""Programming Tech Brief By HackerNoon", "Syntax - Tasty Web Development Treats", "Odd Lots", "Stuff To Blow Your Mind" and "Syntax - Tasty Web Development Treats"" and more!

    Episodes (7)

    Using Diagnostic Observers to Decouple Logging and Observability Code

    Using Diagnostic Observers to Decouple Logging and Observability Code

    This story was originally published on HackerNoon at: https://hackernoon.com/using-diagnostic-observers-to-decouple-logging-and-observability-code.
    Using DiagnosticSource and IObserver implementation to decouple logging code; improving the method adapter to properly handle event data binding.
    Check more stories related to programming at: https://hackernoon.com/c/programming. You can also check exclusive content about #logging, #.net, #observability, #c-sharp, #diagnostic-observers, #decouple-logging, #observability-code-decoupling, #diagnosticsource-guide, and more.

    This story was written by: @dmitriislabko. Learn more about this writer by checking @dmitriislabko's about page, and for more stories, please visit hackernoon.com.

    This article reviews the observability feature in Microsoft libraries provided by DiagnosticSource class, goes over implementation details and specifics how to receive and handle the diagnostic events. It explores the Microsoft's method adapter package to solve event property binding to method parameters, and proposes a solution to its issues, thus making the approach more usable.

    JS Fundamentals - Decorators

    JS Fundamentals - Decorators

    In this Hasty Treat, Scott and Wes talk about whether decorators are finally here, what the uses cases are for decorators, how to define a decorator, and what auto accessor is.

    Show Notes

    on classes

    @loggged class C {} 

    on fields

    class C { @logged x = 1; } 

    Auto Accessor

    class C {   accessor x = 1; } 

    sugar for below

    class C {   #x = 1; // # means private    get x() {     return this.#x;   }    set x(val) {     this.#x = val;   } } 

    Can be decorated and decorator can return new get and set and init functions

    function logged(value, { kind, name }) {   if (kind === "accessor") {     let { get, set } = value;      return {       get() {         console.log(`getting ${name}`);          return get.call(this);       },        set(val) {         console.log(`setting ${name} to ${val}`);          return set.call(this, val);       },        init(initialValue) {         console.log(`initializing ${name} with value ${initialValue}`);         return initialValue;       }     };   }    // ... } 

    Tweet us your tasty treats

    Ex-Logger Aims to Beat Elon Musk in Electric Trucks

    Ex-Logger Aims to Beat Elon Musk in Electric Trucks

    While electric vehicle use is growing rapidly, the internal combustion engine remains completely dominant in the world of heavy trucks. At some point in the future, Tesla has a plan to commercialize an electric semi, but nobody really knows when. Meanwhile, other entities are looking to compete in the world of industrial vehicles. Chace Barber is a former trucker in the logging industry, which has some very different characteristics than the type of freight trucking you typically see on a highway. When you're driving over the Rocky Mountains, without easy proximity to mechanics, tow trucks or service stations, you need power and reliability. His company, Edison Motors, is building its own trucks with a hybrid diesel-electric approach that it sees as a better path forward. On this episode, we discuss the challenges of hauling logs, as well as how it's possible for a small entity to get in the game of building such large industrial equipment.

    See omnystudio.com/listener for privacy information.

    From the Vault: Invention of the Chainsaw, Part 1

    From the Vault: Invention of the Chainsaw, Part 1

    In this classic invention-themed episode of Stuff to Blow Your Mind, Robert and Joe discuss an important piece of cutting technology. Plus, during the Halloween season, masked brutes will chase you around your local haunted attraction with one of these if you buy a ticket. Yes, it’s time to discuss the chainsaw. (originally published 10/26/2021)

    See omnystudio.com/listener for privacy information.

    JS One Liners

    JS One Liners

    In this Hasty Treat, Scott and Wes talk about some Javascript one liners that speed up your coding experience in one line.

    Whether you’re working on a personal project or managing enterprise infrastructure, you deserve simple, affordable, and accessible cloud computing solutions that allow you to take your project to the next level. Simplify your cloud infrastructure with Linode’s Linux virtual machines and develop, deploy, and scale your modern applications faster and easier. Get started on Linode today with a $100 in free credit for listeners of Syntax. You can find all the details at linode.com/syntax. Linode has 11 global data centers and provides 24/7/365 human support with no tiers or hand-offs regardless of your plan size. In addition to shared and dedicated compute instances, you can use your $100 in credit on S3-compatible object storage, Managed Kubernetes, and more. Visit linode.com/syntax and click on the “Create Free Account” button to get started.

    If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up.

    Show Notes

    • 00:24:12 Welcome
    • 01:24:11 Sponsor: Linode
    • 02:11:02 Sponsor: Sentry
    • 03:54:18 Twitter ask for One Liners
    • 04:24:05 Math random const getPsuedoID =() => Math.floor(Math.random() * 1e15);
    • 05:43:09 Random color
    • Paul Irish random color '#'+Math.floor(Math.random()*16777215).toString(16);
    • 06:41:06 Console.log as an object. console.log({ dog, person }); VS Marketplace Link
    • 08:29:17 Edit anything document.designMode = "on"
    • 10:15:15 Temporal date export const today = Temporal.Now.plainDateISO();
    • 11:44:05 Console(log) const myFunc = (age) ⇒ console.log(age) || updateAge()
    • 13:26:13 Remove a prop const { propToRemove, ...rest } = obj;
    • 15:29:01 PHP style debugging preElement.innerText ={JSON.stringify(val, '', ' ')}`
    • 16:31:00 First and Last Destructure var {0: first, length, [length - 1]: last} = [1,2,3];
    • 17:34:17 Speed up audio video document.querySelector('audio, video’).playbackRate = 2
    • Overcast
    • 19:44:15 Sleep function let sleep = (time = 0) => new Promise(r => setTimeout(r, time))
    • 20:26:00 If statements on one line If (!thing) return 'something'

    Tweet us your tasty treats

    The Invention of the Chainsaw, Part 1

    The Invention of the Chainsaw, Part 1

    In today’s invention-themed episode of Stuff to Blow Your Mind, Robert and Joe discuss an important piece of cutting technology. Plus, during the Halloween season, masked brutes will chase you around your local haunted attraction with one of these if you buy a ticket. Yes, it’s time to discuss the chainsaw.

    Learn more about your ad-choices at https://www.iheartpodcastnetwork.com

    See omnystudio.com/listener for privacy information.

    Logging 'The Lungs' of North America

    Logging 'The Lungs' of North America
    The world's largest intact temperate rainforest is in a place you may not expect: southeast Alaska. The Trump administration wants to eliminate a longstanding rule protecting the Tongass National Forest from logging and road construction. Why? And what might this mean for one of the top carbon sinks in the world? Maddie talks with reporter Emily Kwong about the Tongass.

    Learn more about sponsor message choices: podcastchoices.com/adchoices

    NPR Privacy Policy