Skip to content

Instantly share code, notes, and snippets.

@matthewpick
matthewpick / aws_logging_util.py
Last active April 25, 2024 06:23
AWS Lambda universal logging formatter (retain aws_request_id in log output)
import logging
import os
def setup_logging_format(log_level=logging.INFO, override_existing_loggers=True):
"""
Logger formatter that works locally and in AWS lambda
:param log_level: Level of logging
:param override_existing_loggers: Flag for overriding the formatting of all existing loggers
@subfuzion
subfuzion / redis-autostart-osx.md
Last active April 26, 2024 21:40
redis auto start OS X

Install with Homebrew

brew install redis

Set up launchctl to auto start redis

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)