15 Commits

Author SHA1 Message Date
Roger 5f42d4fe5f refactor: redesign logging system for CLI-friendly output (#561)
* refactor: redesign logging system for CLI-friendly output
* refactor: remove ANSI color support from logger
* fix: address PR review feedback
2026-04-07 16:50:01 +08:00
Roger d0971ca098 chore: update CI, golangci-lint, and CLAUDE.md (#511)
* chore: update CI, golangci-lint, and CLAUDE.md
* fix: resolve CI failures on Windows test and lint
* fix: resolve Windows test path and main.go line length lint issues
* fix: auto-format log/ with gofumpt, exclude pre-refactoring lint issues
* fix: resolve remaining lint issues, remove unnecessary exclusions
* fix: remove invalid G117 gosec rule, use text exclusion for secret pattern
* fix: align CI golangci-lint version with local (v2.4 -> v2.10)
2026-03-23 01:40:59 +08:00
ᴍᴏᴏɴD4ʀᴋ ad020cf135 chore: downgrade golang version to 1.20, support Windows 7. (#435)
* chore: downgrade golang version to 1.20, support windows 7

* chore: Update dependencies for Go project.

- Update dependencies in go.sum
- Improvements and optimizations in various files
- Bug fixes and error handling enhancements

* chore: Update modernc.org/sqlite library versions in go.mod and go.sum files

- Update version of `modernc.org/sqlite` to `v1.31.1` in `go.mod` and `go.sum` files
- Update module hash in `go.sum` file for `modernc.org/sqlite`
- Ensure consistency between `go.mod` and `go.sum` files in relation to `modernc.org/sqlite` version

* chore: replace log/slog with standard logger (#436)

* chore: replace log/slog with standard logger

* chore: Update Go dependencies and versions

- Update Go version from `1.22.5` to `1.20` and other dependencies
- Update critical dependencies to latest versions
- Ensure compatibility with new versions of dependencies

* chore: Optimize dependency management in workflows

- Update build and lint workflows to use `go mod tidy` for getting dependencies
- Change modules download mode to `'mod'` in linters configuration
- Add step to get dependencies in lint workflow

* refactor: Update dependencies and refactor Chromium key deletion logic

- Update `modernc.org/sqlite` to `v1.31.1` in `go.mod` and `go.sum`
- Increase version number to `0.5.0` in `cmd/hack-browser-data/main.go`
- Refactor and update logic for filtering and copying items in `browser/chromium/chromium.go`

* Improve logging functionality and data type conversion

- Add `String()` method to `DataType` enum in types.go
- Update log level to Debug in logger_test.go
- Set log level to Debug in `TestLoggerDebug` and `TestLoggerDebugf` functions
2024-10-22 13:01:13 +08:00
ᴍᴏᴏɴD4ʀᴋ e48f35cfd3 feat: refactor logger to standard library (#280)
* refactor: Refactor logging to use structured slog package.

- Remove `gookit` dependencies from `go.sum`
- Improve error logging in multiple packages by replacing `log` with `log/slog`
- Update dependencies in `go.mod`
- Add new `logger` package with test cases
- Refactor logging statements in multiple packages to use `slog` instead of `log`
- Change logging format and level in multiple packages for better structured logging

* refactor: Refactor logger package and add handler interface

- Refactor logger package
- Rename `defaultHandler` to `DefaultLogger`
- Move `ReplaceAttr` function to `Logger` struct
- Implement `LogHandler` struct with `slog.Handler` interface
- Add new `Logger` methods for configuration
- Add `SetMaxLevel`, `SetJSONHandler`, `SetTextHandler`, `SetOutput`, `SetVerbose`, `SetReplaceAttrFunc`
- Add verbose flag to `cmd/hack-browser-data/main.go` to increase logging

* refactor: Refactor logger package to use simplified handler initialization.

- Refactor logger package to use Default instead of DefaultLogger
- Update `NewHandler` method to correctly reference `Default` logger and simplify handler initialization
- Update tests for logger to reflect changes in Default usage
- Rename `DefaultLogger` to `Default` and update comments to better reflect its purpose
- Update function calls in hack-browser-data main.go to reflect logger package updates

* refactor: Refactor logging in Chromium implementation

Refactor logging and simplify decryption in chromium files
- Replace logger package import with shared slog package
- Change logging messages to use slog instead of logger
- Simplify decryption process by removing first 5 characters of encrypted key
- Refactor error logging in linux file to use shared slog package
- Replace string concatenation with formatted string in linux error message
2024-01-16 14:06:13 +08:00
moonD4rk cc4edc5cb6 refactor: initial default logger 2023-03-10 15:58:10 +08:00
moonD4rk b65d3186c4 chore: update project layout 2023-03-10 14:52:26 +08:00
ᴍᴏᴏɴD4ʀᴋ c8717e3009 dev-feat: add chromium browser for macos 2022-04-17 16:42:36 +08:00
ᴍᴏᴏɴD4ʀᴋ 2b2cc13cff refactor: format code with interface, Close #22 2020-08-01 02:36:44 +08:00
ᴍᴏᴏɴD4ʀᴋ aab3aafad7 refactor: remove zap log package Close #19 2020-07-24 17:39:44 +08:00
ᴍᴏᴏɴD4ʀᴋ 169cf9ae65 refactor: format filename 2020-06-28 17:25:38 +08:00
ᴍᴏᴏɴD4ʀᴋ 206a13cfd6 docs: update readme to 0.1.0 2020-06-28 17:18:02 +08:00
ᴍᴏᴏɴD4ʀᴋ ebeef65f81 feat: sort output by timestamp 2020-06-26 04:33:23 +08:00
ᴍᴏᴏɴD4ʀᴋ 31419dc003 feat: add error warp 2020-06-25 17:37:18 +08:00
ᴍᴏᴏɴD4ʀᴋ 7e472c5cee feat: add history parse 2020-06-22 17:23:18 +08:00
ᴍᴏᴏɴD4ʀᴋ 891e3fac81 feat: add chrome password decrypt 2020-06-19 20:43:31 +08:00