Tag: logging
4 รายการ
Blog

pythonsecuritysecrets
Python โหลด Secret ให้ครบก่อนเริ่มงาน พร้อมปิดค่าลับใน Log
ตรวจตัวแปรสภาพแวดล้อมที่จำเป็นให้ครบก่อนเปิดบริการ ซ่อนค่าลับใน log และเตรียมรับคีย์เก่าระหว่างหมุนคีย์ พร้อม unittest ที่รันได้
bunjavascriptlogging
Bun.inspect.custom: ทำ log อ่านง่ายโดยไม่เผลอพ่น secret
กำหนด representation ของ object ด้วย Bun.inspect.custom พร้อมทดสอบ redaction และเตือนว่าไม่ใช่ security boundary
pythonloggingobservability
Python LoggerAdapter merge_extra: รวม context ประจำกับข้อมูลต่อ log call
ใช้ LoggerAdapter merge_extra เพิ่ม request context โดยไม่ทับข้อมูลต่อเหตุการณ์ พร้อม unittest ที่ตรวจ LogRecord จริงและข้อควรระวัง secret
bunjavascriptlogging
Bun.inspect.table: ได้ตารางอ่านง่ายเป็น string ก่อนส่งเข้า log หรือ snapshot
ต่างจาก console.table ตรงที่คืนค่า string ทำให้จัดเก็บ ส่งต่อ และเทสต์ output ได้ตรงๆ