Skip to content

Commit

Permalink
Merge pull request #162 from invenia/rf/document-fmt-tokens
Browse files Browse the repository at this point in the history
Cleanup documentation and reference DefaultRecord fields in `config!` docstring
  • Loading branch information
rofinn authored May 22, 2020
2 parents 14b5a25 + 39fc7ff commit 6051407
Show file tree
Hide file tree
Showing 16 changed files with 268 additions and 116 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.DS_Store
Manifest.toml
docs/build/
docs/site/
Manifest.toml
!docs/Manifest.toml
*.jl.*.cov
benchmark/.results/*.jld
benchmark/.tune.jld
145 changes: 145 additions & 0 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# This file is machine-generated - editing it directly is not advised

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "88bb0edb352b16608036faadcc071adda068582a"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.1"

[[Documenter]]
deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Unicode"]
git-tree-sha1 = "580155ffaeb175f37dc0bd31ed6c127663efbc60"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.22.6"

[[ExprTools]]
git-tree-sha1 = "6f0517056812fd6aa3af23d4b70d5325a2ae4e95"
uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
version = "0.1.1"

[[EzXML]]
deps = ["Printf", "XML2_jll"]
git-tree-sha1 = "0fa3b52a04a4e210aeb1626def9c90df3ae65268"
uuid = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
version = "1.1.0"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[JSON]]
deps = ["Dates", "Mmap", "Unicode"]
git-tree-sha1 = "565947e5338efe62a7db0aa8e5de782c623b04cd"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.20.1"

[[LibGit2]]
deps = ["Printf"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[Libiconv_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "e5256a3b0ebc710dbd6da0c0b212164a3681037f"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.16.0+2"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[Memento]]
deps = ["Dates", "Distributed", "JSON", "Serialization", "Sockets", "Syslogs", "Test", "TimeZones", "UUIDs"]
path = ".."
uuid = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9"
version = "1.1.0"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[Mocking]]
deps = ["ExprTools"]
git-tree-sha1 = "916b850daad0d46b8c71f65f719c49957e9513ed"
uuid = "78c3b35d-d492-501b-9361-3d52fe80e533"
version = "0.7.1"

[[Pkg]]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[RecipesBase]]
git-tree-sha1 = "54f8ceb165a0f6d083f0d12cb4996f5367c6edbc"
uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
version = "1.0.1"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[Syslogs]]
deps = ["Printf", "Sockets"]
git-tree-sha1 = "46badfcc7c6e74535cc7d833a91f4ac4f805f86d"
uuid = "cea106d9-e007-5e6c-ad93-58fe2094e9c4"
version = "0.3.0"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[TimeZones]]
deps = ["Dates", "EzXML", "Mocking", "Printf", "RecipesBase", "Serialization", "Unicode"]
git-tree-sha1 = "db7bc2051d4c2e5f336409224df81485c00de6cb"
uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53"
version = "1.2.0"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[XML2_jll]]
deps = ["Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "987c02a43fa10a491a5f0f7c46a6d3559ed6a8e2"
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version = "2.9.9+4"

[[Zlib_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "a2e0d558f6031002e380a90613b199e37a8565bf"
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.11+10"
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Memento = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9"

[compat]
Documenter = "~0.22"
5 changes: 1 addition & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ makedocs(
"faq/pkg-usage.md",
"faq/testing.md",
],
"API" => Any[
"api/public.md",
"api/private.md",
],
"API" => "api.md",
"Contributing" => "contributing.md",
],
)
Expand Down
107 changes: 107 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Public

## Configuration

```@docs
Memento.config!
Memento.register
Memento.reset!
```

## Loggers

```@docs
Logger
getlogger
log(::Logger, ::Record)
log(::Logger, ::AbstractString, ::AbstractString)
log(::Function, ::Logger, ::AbstractString)
getlevel(::Logger)
Memento.getlevels(::Logger)
setlevel!(::Logger, ::AbstractString)
setlevel!(::Function, ::Logger, ::AbstractString)
gethandlers
Base.push!(::Logger, ::Handler)
getfilters(::Logger)
push!(::Logger, ::Memento.Filter)
Memento.getpath
Memento.getchildren
isroot
isset
ispropagating
setpropagating!
setrecord!
trace
debug
info
notice
warn
error
critical
alert
emergency
```

## Handlers

```@docs
Handler
DefaultHandler
Escalator
log(::Handler, ::Record)
getlevel(::Handler)
getfilters(::Handler)
Memento.emit
setlevel!(::DefaultHandler, ::AbstractString)
push!(::DefaultHandler, ::Memento.Filter)
Memento.getlevels(::Handler)
Memento.setup_opts
```

## Formatters

```@docs
Formatter
DefaultFormatter
DictFormatter
format
```

## Records

```@docs
Record
Memento.getlevel(::Record)
DefaultRecord
Memento.Attribute
Memento.AttributeRecord
Base.get(::Memento.Attribute)
Base.Dict(::Record)
Memento.get_trace
Memento.get_lookup
```

## IO

```@docs
FileRoller
Memento.getfile
Memento.getsuffix
```

## Memento.TestUtils

```@docs
Memento.TestUtils.@test_log
Memento.TestUtils.@test_nolog
Memento.TestUtils.@test_warn
Memento.TestUtils.@test_throws
```

## Misc

```@docs
Memento.Filter
Memento.EscalationError
Memento.LoggerSerializationError
```
45 changes: 0 additions & 45 deletions docs/src/api/private.md

This file was deleted.

55 changes: 0 additions & 55 deletions docs/src/api/public.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/src/faq/another-logging-lib.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Another logging library?
# [Another logging library?](@id yall)

*...or why did you fork [Lumberjack.jl](https://github.com/WestleyArgentum/Lumberjack.jl)?*

Expand Down
2 changes: 1 addition & 1 deletion docs/src/faq/change-colors.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changing colors?
# [Changing colors?](@id change_colors)

Colors can be enabled/disabled and set using via the `is_colorized` and `colors` options to the `DefaultHandler`.

Expand Down
Loading

0 comments on commit 6051407

Please sign in to comment.