Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
stale-issues:
runs-on: ubuntu-latest
if: github.repository == 'yeongseon/azure-functions-logging'
if: github.repository == 'yeongseon/azure-functions-logging-python'

steps:
- name: "Stale issues and PRs"
Expand All @@ -32,7 +32,7 @@ jobs:

stale-branches:
runs-on: ubuntu-latest
if: github.repository == 'yeongseon/azure-functions-logging'
if: github.repository == 'yeongseon/azure-functions-logging-python'

steps:
- name: "Checkout code"
Expand Down
16 changes: 8 additions & 8 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

[![PyPI](https://img.shields.io/pypi/v/azure-functions-logging.svg)](https://pypi.org/project/azure-functions-logging/)
[![Python Version](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://pypi.org/project/azure-functions-logging/)
[![CI](https://github.com/yeongseon/azure-functions-logging/actions/workflows/ci-test.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/ci-test.yml)
[![Release](https://github.com/yeongseon/azure-functions-logging/actions/workflows/release.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/release.yml)
[![Security Scans](https://github.com/yeongseon/azure-functions-logging/actions/workflows/security.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/security.yml)
[![codecov](https://codecov.io/gh/yeongseon/azure-functions-logging/branch/main/graph/badge.svg)](https://codecov.io/gh/yeongseon/azure-functions-logging)
[![CI](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/ci-test.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/ci-test.yml)
[![Release](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/release.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/release.yml)
[![Security Scans](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/security.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/security.yml)
[![codecov](https://codecov.io/gh/yeongseon/azure-functions-logging-python/branch/main/graph/badge.svg)](https://codecov.io/gh/yeongseon/azure-functions-logging-python)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com/)
[![Docs](https://img.shields.io/badge/docs-gh--pages-blue)](https://yeongseon.github.io/azure-functions-logging/)
[![Docs](https://img.shields.io/badge/docs-gh--pages-blue)](https://yeongseon.github.io/azure-functions-logging-python/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

他の言語: [English](README.md) | [한국어](README.ko.md) | [简体中文](README.zh-CN.md)
Expand Down Expand Up @@ -56,8 +56,8 @@ pip install azure-functions-logging
ローカル開発用:

```bash
git clone https://github.com/yeongseon/azure-functions-logging.git
cd azure-functions-logging
git clone https://github.com/yeongseon/azure-functions-logging-python.git
cd azure-functions-logging-python
pip install -e .[dev]
```

Expand Down Expand Up @@ -101,7 +101,7 @@ bound.info("Processing") # includes user_id + operation in every log line

## Documentation

- 全ドキュメント: [yeongseon.github.io/azure-functions-logging](https://yeongseon.github.io/azure-functions-logging/)
- 全ドキュメント: [yeongseon.github.io/azure-functions-logging-python](https://yeongseon.github.io/azure-functions-logging-python/)
- 製品要件: `PRD.md`

## Ecosystem
Expand Down
16 changes: 8 additions & 8 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

[![PyPI](https://img.shields.io/pypi/v/azure-functions-logging.svg)](https://pypi.org/project/azure-functions-logging/)
[![Python Version](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://pypi.org/project/azure-functions-logging/)
[![CI](https://github.com/yeongseon/azure-functions-logging/actions/workflows/ci-test.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/ci-test.yml)
[![Release](https://github.com/yeongseon/azure-functions-logging/actions/workflows/release.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/release.yml)
[![Security Scans](https://github.com/yeongseon/azure-functions-logging/actions/workflows/security.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/security.yml)
[![codecov](https://codecov.io/gh/yeongseon/azure-functions-logging/branch/main/graph/badge.svg)](https://codecov.io/gh/yeongseon/azure-functions-logging)
[![CI](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/ci-test.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/ci-test.yml)
[![Release](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/release.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/release.yml)
[![Security Scans](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/security.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/security.yml)
[![codecov](https://codecov.io/gh/yeongseon/azure-functions-logging-python/branch/main/graph/badge.svg)](https://codecov.io/gh/yeongseon/azure-functions-logging-python)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com/)
[![Docs](https://img.shields.io/badge/docs-gh--pages-blue)](https://yeongseon.github.io/azure-functions-logging/)
[![Docs](https://img.shields.io/badge/docs-gh--pages-blue)](https://yeongseon.github.io/azure-functions-logging-python/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

다른 언어: [English](README.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
Expand Down Expand Up @@ -56,8 +56,8 @@ pip install azure-functions-logging
로컬 개발용:

```bash
git clone https://github.com/yeongseon/azure-functions-logging.git
cd azure-functions-logging
git clone https://github.com/yeongseon/azure-functions-logging-python.git
cd azure-functions-logging-python
pip install -e .[dev]
```

Expand Down Expand Up @@ -101,7 +101,7 @@ bound.info("Processing") # includes user_id + operation in every log line

## Documentation

- 전체 문서: [yeongseon.github.io/azure-functions-logging](https://yeongseon.github.io/azure-functions-logging/)
- 전체 문서: [yeongseon.github.io/azure-functions-logging-python](https://yeongseon.github.io/azure-functions-logging-python/)
- 제품 요구 사항: `PRD.md`

## Ecosystem
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

[![PyPI](https://img.shields.io/pypi/v/azure-functions-logging.svg)](https://pypi.org/project/azure-functions-logging/)
[![Python Version](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://pypi.org/project/azure-functions-logging/)
[![CI](https://github.com/yeongseon/azure-functions-logging/actions/workflows/ci-test.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/ci-test.yml)
[![Release](https://github.com/yeongseon/azure-functions-logging/actions/workflows/publish-pypi.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/publish-pypi.yml)
[![Security Scans](https://github.com/yeongseon/azure-functions-logging/actions/workflows/security.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/security.yml)
[![codecov](https://codecov.io/gh/yeongseon/azure-functions-logging/branch/main/graph/badge.svg)](https://codecov.io/gh/yeongseon/azure-functions-logging)
[![CI](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/ci-test.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/ci-test.yml)
[![Release](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/publish-pypi.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/publish-pypi.yml)
[![Security Scans](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/security.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/security.yml)
[![codecov](https://codecov.io/gh/yeongseon/azure-functions-logging-python/branch/main/graph/badge.svg)](https://codecov.io/gh/yeongseon/azure-functions-logging-python)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com/)
[![Docs](https://img.shields.io/badge/docs-gh--pages-blue)](https://yeongseon.github.io/azure-functions-logging/)
[![Docs](https://img.shields.io/badge/docs-gh--pages-blue)](https://yeongseon.github.io/azure-functions-logging-python/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

Read this in: [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
Expand Down Expand Up @@ -351,10 +351,10 @@ Create bound loggers per-invocation. Do not cache them at module level.

## Documentation

- Full docs: [yeongseon.github.io/azure-functions-logging](https://yeongseon.github.io/azure-functions-logging/)
- [Configuration reference](https://yeongseon.github.io/azure-functions-logging/configuration/)
- [Troubleshooting guide](https://yeongseon.github.io/azure-functions-logging/troubleshooting/)
- [API reference](https://yeongseon.github.io/azure-functions-logging/api/)
- Full docs: [yeongseon.github.io/azure-functions-logging-python](https://yeongseon.github.io/azure-functions-logging-python/)
- [Configuration reference](https://yeongseon.github.io/azure-functions-logging-python/configuration/)
- [Troubleshooting guide](https://yeongseon.github.io/azure-functions-logging-python/troubleshooting/)
- [API reference](https://yeongseon.github.io/azure-functions-logging-python/api/)

## Ecosystem

Expand Down
16 changes: 8 additions & 8 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

[![PyPI](https://img.shields.io/pypi/v/azure-functions-logging.svg)](https://pypi.org/project/azure-functions-logging/)
[![Python Version](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://pypi.org/project/azure-functions-logging/)
[![CI](https://github.com/yeongseon/azure-functions-logging/actions/workflows/ci-test.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/ci-test.yml)
[![Release](https://github.com/yeongseon/azure-functions-logging/actions/workflows/release.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/release.yml)
[![Security Scans](https://github.com/yeongseon/azure-functions-logging/actions/workflows/security.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging/actions/workflows/security.yml)
[![codecov](https://codecov.io/gh/yeongseon/azure-functions-logging/branch/main/graph/badge.svg)](https://codecov.io/gh/yeongseon/azure-functions-logging)
[![CI](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/ci-test.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/ci-test.yml)
[![Release](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/release.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/release.yml)
[![Security Scans](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/security.yml/badge.svg)](https://github.com/yeongseon/azure-functions-logging-python/actions/workflows/security.yml)
[![codecov](https://codecov.io/gh/yeongseon/azure-functions-logging-python/branch/main/graph/badge.svg)](https://codecov.io/gh/yeongseon/azure-functions-logging-python)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com/)
[![Docs](https://img.shields.io/badge/docs-gh--pages-blue)](https://yeongseon.github.io/azure-functions-logging/)
[![Docs](https://img.shields.io/badge/docs-gh--pages-blue)](https://yeongseon.github.io/azure-functions-logging-python/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

其他语言: [English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md)
Expand Down Expand Up @@ -56,8 +56,8 @@ pip install azure-functions-logging
本地开发用:

```bash
git clone https://github.com/yeongseon/azure-functions-logging.git
cd azure-functions-logging
git clone https://github.com/yeongseon/azure-functions-logging-python.git
cd azure-functions-logging-python
pip install -e .[dev]
```

Expand Down Expand Up @@ -101,7 +101,7 @@ bound.info("Processing") # includes user_id + operation in every log line

## Documentation

- 完整文档: [yeongseon.github.io/azure-functions-logging](https://yeongseon.github.io/azure-functions-logging/)
- 完整文档: [yeongseon.github.io/azure-functions-logging-python](https://yeongseon.github.io/azure-functions-logging-python/)
- 产品需求文档: `PRD.md`

## Ecosystem
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Thank you for your interest in contributing to `azure-functions-logging`. This g
2. Clone your fork:

```bash
git clone https://github.com/<your-username>/azure-functions-logging.git
cd azure-functions-logging
git clone https://github.com/<your-username>/azure-functions-logging-python.git
cd azure-functions-logging-python
```

3. Install development dependencies:
Expand Down
4 changes: 2 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ This guide explains how to set up a development environment for `azure-functions
1. Clone the repository:

```bash
git clone https://github.com/yeongseon/azure-functions-logging.git
cd azure-functions-logging
git clone https://github.com/yeongseon/azure-functions-logging-python.git
cd azure-functions-logging-python
```

2. Install the package in editable mode with development dependencies:
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ dependencies = [
To contribute to the project or run tests locally, clone the repository and install in editable mode with development dependencies:

```bash
git clone https://github.com/yeongseon/azure-functions-logging.git
cd azure-functions-logging
git clone https://github.com/yeongseon/azure-functions-logging-python.git
cd azure-functions-logging-python
pip install -e ".[dev]"
```

Expand Down
4 changes: 2 additions & 2 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
- Version: 0.4.1
- Python: >=3.10, <3.15
- License: MIT
- Docs: https://yeongseon.github.io/azure-functions-logging/
- Repository: https://github.com/yeongseon/azure-functions-logging
- Docs: https://yeongseon.github.io/azure-functions-logging-python/
- Repository: https://github.com/yeongseon/azure-functions-logging-python

## Installation

Expand Down
14 changes: 7 additions & 7 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
- Version: 0.4.1
- Python: >=3.10, <3.15
- License: MIT
- Docs: https://yeongseon.github.io/azure-functions-logging/
- Repository: https://github.com/yeongseon/azure-functions-logging
- Docs: https://yeongseon.github.io/azure-functions-logging-python/
- Repository: https://github.com/yeongseon/azure-functions-logging-python

## What It Does

Expand Down Expand Up @@ -68,11 +68,11 @@ def handler(req, context):

## Documentation

- [Getting Started](https://yeongseon.github.io/azure-functions-logging/getting-started/)
- [API Reference](https://yeongseon.github.io/azure-functions-logging/api/)
- [Configuration](https://yeongseon.github.io/azure-functions-logging/configuration/)
- [Examples](https://yeongseon.github.io/azure-functions-logging/examples/)
- [Troubleshooting](https://yeongseon.github.io/azure-functions-logging/troubleshooting/)
- [Getting Started](https://yeongseon.github.io/azure-functions-logging-python/getting-started/)
- [API Reference](https://yeongseon.github.io/azure-functions-logging-python/api/)
- [Configuration](https://yeongseon.github.io/azure-functions-logging-python/configuration/)
- [Examples](https://yeongseon.github.io/azure-functions-logging-python/examples/)
- [Troubleshooting](https://yeongseon.github.io/azure-functions-logging-python/troubleshooting/)

## Ecosystem

Expand Down
6 changes: 3 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
site_name: Azure Functions Logging
site_description: Developer-friendly logging helpers for Azure Functions Python
site_author: Yeongseon Choe
site_url: https://yeongseon.github.io/azure-functions-logging/
repo_url: https://github.com/yeongseon/azure-functions-logging
site_url: https://yeongseon.github.io/azure-functions-logging-python/
repo_url: https://github.com/yeongseon/azure-functions-logging-python
edit_uri: edit/main/docs/

theme:
Expand Down Expand Up @@ -75,7 +75,7 @@ plugins:
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/yeongseon/azure-functions-logging
link: https://github.com/yeongseon/azure-functions-logging-python
copyright: |
© 2026 Yeongseon Choe – MIT Licensed

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ classifiers = [
]

[project.urls]
Homepage = "https://yeongseon.github.io/azure-functions-logging/"
Documentation = "https://yeongseon.github.io/azure-functions-logging/"
Repository = "https://github.com/yeongseon/azure-functions-logging"
Issues = "https://github.com/yeongseon/azure-functions-logging/issues"
Homepage = "https://yeongseon.github.io/azure-functions-logging-python/"
Documentation = "https://yeongseon.github.io/azure-functions-logging-python/"
Repository = "https://github.com/yeongseon/azure-functions-logging-python"
Issues = "https://github.com/yeongseon/azure-functions-logging-python/issues"

[project.optional-dependencies]
dev = [
Expand Down
2 changes: 1 addition & 1 deletion src/azure_functions_logging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"with_context",
]

__version__ = "0.5.0"
__version__ = "0.5.2"


def get_logger(name: str | None = None) -> FunctionLogger:
Expand Down
21 changes: 20 additions & 1 deletion src/azure_functions_logging/_json_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from datetime import datetime, timezone
import json
import logging
from typing import Any

_STANDARD_RECORD_FIELDS: set[str] = {
"args",
Expand Down Expand Up @@ -38,12 +39,30 @@
}


def _json_default(value: Any) -> str:
"""Fallback serializer for ``json.dumps``.

A logging library must never lose log records because of an unserializable
``extra`` value (datetime, Decimal, UUID, dataclass, exception, request
objects, etc.). This callable coerces unknown values to ``str(value)`` and
returns a sentinel string if even ``str()`` raises, so the formatter always
produces a valid JSON document.
"""
try:
return str(value)
except Exception:
return f"<unserializable:{type(value).__name__}>"


class JsonFormatter(logging.Formatter):
"""Structured JSON log formatter.

Output is newline-delimited JSON (NDJSON), with one JSON object per log line.
Context fields (invocation_id, function_name, etc.) are included when present
on the LogRecord (set by ContextFilter).

Unserializable values in ``extra`` are coerced to strings via
:func:`_json_default` rather than dropping the log record.
"""

def __init__(self) -> None:
Expand Down Expand Up @@ -74,4 +93,4 @@ def format(self, record: logging.LogRecord) -> str:
"extra": extra,
}

return json.dumps(payload, ensure_ascii=False)
return json.dumps(payload, ensure_ascii=False, default=_json_default)
Loading
Loading