Skip to content

Instantly share code, notes, and snippets.

View allending's full-sized avatar

Allen Ding allending

View GitHub Profile
# Logging Best Practices for Distributed Transactional Systems
This guide outlines 12 best practices for logging in distributed systems that handle transactional processing, with examples in Java using SLF4J.
## Table of Contents
- [1. Include a Unique Transaction / Correlation ID](#1-include-a-unique-transaction--correlation-id)
- [2. Log at Key Lifecycle Points](#2-log-at-key-lifecycle-points)
- [3. Use Structured Logging (e.g. JSON)](#3-use-structured-logging-(eg-json))
- [4. Capture and Log Errors with Full Stack Traces](#4-capture-and-log-errors-with-full-stack-traces)
- [5. Consistent Format and Naming for Message Templates](#5-consistent-format-and-naming-for-message-templates)

Keybase proof

I hereby claim:

  • I am allending on github.
  • I am allending (https://keybase.io/allending) on keybase.
  • I have a public key whose fingerprint is 7334 3A6D 44AB B998 6B5D 60C3 6A73 A638 6D54 0B5E

To claim this, I am signing this object:

[
{
"resourceId": 31758,
"title": "Up The Ante - Kopitiam Talk #5: Managing 20 over investors",
"link": "http://www.bfm.my/31758.html",
"description": "<p>Starting up a restaurant usually begins with a few partners and a small sum of capital. But this week&rsquo;s Kopitiam Talk we have two outlets that crowdfunded their outlets and today, they have to manage over 20 investors. How are they managing their expectations as well as their cashflow? TC Hui from Ticklish Ribs &amp; Wiches and Hwa Yang Jerng from Sudobrew tell us more.</p>",
"encoding": "audio/mpeg",
"programId": 240,
"downloadLink": "http://open-for-business.s3.amazonaws.com/2016.04.04-OFB-UTA-Kopitiam5-ManagingInvestor-Sudobrew-TicklishRibs.mp3",
"highlightImage": "http://www.bfm.my/assets/images/Enterprise/Open-For-Business/koptiamtalk.jpg",
lembacon
Aug 5, 2015 5:04 AM
(in response to daltheman)
Hi guys, I've just found a temporary workaround. (Applies to Xcode 7 beta 4 on OS X El Capitan Developer Beta 6)
Open your Terminal:
cd /Applications/Xcode-beta.app (or wherever your Xcode 7 beta 4 is located)
cd Contents/Developer/Platforms/iPhoneSimulator.platform
cd Developer/SDKs/iPhoneSimulator.sdk/usr/lib
sudo mv dyld_sim dyld_sim.orig
import Foundation
extension SequenceType {
func each(@noescape block: (element: Self.Generator.Element) -> Void) {
for item in self {
block(element: item)
}
}
func eachWithIndex(@noescape block: (Int, Self.Generator.Element) -> Void) {
//: Playground - noun: a place where people can play
import UIKit
// - Equatable has a Self requirement, so Value has a Self requirement
// - So you couldn't use it as a type anyway:
//
// e.g. let myValue : Value = ... // doesn't work
//
// - The problem comes from requiring Value to be Equatable. In this case,
$ du -h -d 1 .
24K ./bindings
76K ./cmake
3.9G ./Debug+Asserts
76K ./docs
4.0K ./examples
2.4M ./include
1.2G ./lib
4.0K ./projects
12K ./test
- (void)testBlock {
NSMutableArray *array = [[NSMutableArray alloc] initWithObjects:@"foo", @"bar", nil];
void(^block)(void) = ^{
// probably dies in here
[array addObject:@"bomb"];
[array removeObject:@"bomb"];
};
// block retains array?