---
title: clsLoginLog
summary: API reference for clsLoginLog.
status: draft
owner: <owner>
last_reviewed: 2026-07-23
library: SAIF.Framework.Logging
reference_type: package
---

# clsLoginLog

`clsLoginLog` is a legacy, independent login-event logger that writes user login records directly to a monthly append-mode CSV file, bypassing the `clsLogCommon`/`wsLogging` dual-sink pattern used by the other logging classes.

## Purpose
- Record a user login event (user ID, timestamp, IP address) to a monthly CSV log file.

## Context
- Namespace: `SAIF.Framework.Logging`
- Assembly/package: `SAIF.BOF.Framework.Logging` (`SAIF.Framework.Logging/SAIF.BOF.Framework.Logging.vbproj`)
- Class has Shared (static) members only.

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `LogItem` | `Shared Sub LogItem(inUserID As String)` | Writes a login event line (`Now, userID, IPAddress`) to the current month's login log file. |

## Behavioral notes
- Determines the log file path and requester IP address from `HttpContext.Current` when present (web context); otherwise falls back to the current directory and loopback address (non-web context)*.
- Opens (or reuses) a monthly append-mode log file named `Login{month}{year}.log`.
- All exceptions are swallowed silently (see [BR-005](../../business-rules.md#br-005-logging-failures-must-never-raise-exceptions-to-the-caller)); a failure to write the login record is invisible to the caller.
- Does not use the `clsLogCommon` context-gathering helpers or the `wsLogging` SOAP sink used by `clsLogAudit`/`clsLogError`/`clsLogTrace` — this is an independent, older implementation*.

## Constraints and usage notes
- Callers cannot detect whether a given `LogItem` call actually succeeded, since all failures are silently swallowed.
- The monthly log file is a local file only; there is no remote/web-service sink option for this class.

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Framework.Logging/clsLoginLog.vb`
