Skip to content

Instantly share code, notes, and snippets.

View PapaTaylor's full-sized avatar

Kelly Taylor PapaTaylor

  • Rocklin, CA
View GitHub Profile
@PapaTaylor
PapaTaylor / LogChunkAppender.java
Created April 5, 2022 18:40 — forked from dsbecker/LogChunkAppender.java
A logback appender that will chunk large messages into smaller ones and link them all together with a chunk identifier. By default, it tries to split on line feeds wherever possible, but will split long lines if needed.
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.spi.IThrowableProxy;
import ch.qos.logback.classic.spi.LoggerContextVO;
import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.classic.spi.ThrowableProxy;
import ch.qos.logback.core.Appender;
import ch.qos.logback.core.UnsynchronizedAppenderBase;
import ch.qos.logback.core.spi.AppenderAttachable;
import ch.qos.logback.core.spi.AppenderAttachableImpl;
import ch.qos.logback.core.spi.LifeCycle;
@PapaTaylor
PapaTaylor / Setup MongoDB on localhost as Replica Set
Created October 5, 2021 21:44 — forked from davisford/Setup MongoDB on localhost as Replica Set
Setup MongoDB replica set on local host with only a single primary
Add the `replication` section to the mongod.conf file:
```
$cat /usr/local/etc/mongod.conf
systemLog:
destination: file
path: /usr/local/var/log/mongodb/mongo.log
logAppend: true
storage:
engine: mmapv1