Skip to content

Commit eca2c39

Browse files
authored
Merge pull request #7 from tanmaykm/tan/misc
update CI, move to github actions, update README
2 parents 8a0d3d2 + 5d07012 commit eca2c39

File tree

6 files changed

+83
-34
lines changed

6 files changed

+83
-34
lines changed

.appveyor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
environment:
22
matrix:
33
- julia_version: 1.0
4-
- julia_version: 1.1
5-
- julia_version: 1.2
6-
- julia_version: 1.3
7-
- julia_version: 1.4
4+
- julia_version: 1
85
- julia_version: nightly
96

107
platform:

.github/workflows/TagBot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: TagBot
2+
on:
3+
schedule:
4+
- cron: 0 * * * *
5+
jobs:
6+
TagBot:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: JuliaRegistries/TagBot@v1
10+
with:
11+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [master]
5+
tags: ["*"]
6+
pull_request:
7+
jobs:
8+
test:
9+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
version:
15+
- '1.0'
16+
- '1' # automatically expands to the latest stable 1.x release of Julia
17+
- nightly
18+
os:
19+
- ubuntu-latest
20+
arch:
21+
- x64
22+
- x86
23+
include:
24+
# test macOS and Windows with latest Julia only
25+
- os: macOS-latest
26+
arch: x64
27+
version: 1
28+
- os: windows-latest
29+
arch: x64
30+
version: 1
31+
- os: windows-latest
32+
arch: x86
33+
version: 1
34+
steps:
35+
- uses: actions/checkout@v2
36+
- uses: julia-actions/setup-julia@v1
37+
with:
38+
version: ${{ matrix.version }}
39+
arch: ${{ matrix.arch }}
40+
- uses: actions/cache@v1
41+
env:
42+
cache-name: cache-artifacts
43+
with:
44+
path: ~/.julia/artifacts
45+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
46+
restore-keys: |
47+
${{ runner.os }}-test-${{ env.cache-name }}-
48+
${{ runner.os }}-test-
49+
${{ runner.os }}-
50+
- uses: julia-actions/julia-buildpkg@v1
51+
- uses: julia-actions/julia-runtest@v1
52+
- uses: julia-actions/julia-processcoverage@v1
53+
- uses: codecov/codecov-action@v1
54+
with:
55+
file: lcov.info

.travis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# LogCompose
22

3-
[![Build Status](https://travis-ci.org/tanmaykm/LogCompose.jl.png)](https://travis-ci.org/tanmaykm/LogCompose.jl)
3+
[![Build Status](https://github.com/tanmaykm/LogCompose.jl/workflows/CI/badge.svg)](https://github.com/tanmaykm/LogCompose.jl/actions?query=workflow%3ACI+branch%3Amaster)
44
[![Build Status](https://ci.appveyor.com/api/projects/status/github/tanmaykm/LogCompose.jl?branch=master&svg=true)](https://ci.appveyor.com/project/tanmaykm/logroller-jl/branch/master)
5-
[![Coverage Status](https://coveralls.io/repos/github/tanmaykm/LogCompose.jl/badge.svg?branch=master)](https://coveralls.io/github/tanmaykm/LogCompose.jl?branch=master)
5+
[![codecov.io](http://codecov.io/github/tanmaykm/LogCompose.jl/coverage.svg?branch=master)](http://codecov.io/github/tanmaykm/LogCompose.jl?branch=master)
66

77
Provides a way to specify hierarchical logging configuration in a file.
88

@@ -61,6 +61,18 @@ There are external packages that provide support for a few other types of logger
6161
- LogRoller: [LogRollerCompose.jl](https://github.com/tanmaykm/LogRollerCompose.jl)
6262
- SyslogLogging: [SyslogLoggingCompose.jl](https://github.com/tanmaykm/SyslogLoggingCompose.jl)
6363
64+
For loggers supplied by external packages, LogCompose looks for the logger implementation type
65+
(the one mentioned in `type` configuration attribute) in the `Main` module by default. But if
66+
your code imports the external loggers within your module instead of the Main module, then the
67+
module name where the logger type can be found must be specified in the (otherwise optional)
68+
`topmodule` configuration parameter. E.g.:
69+
70+
```
71+
[loggers.rollinglog]
72+
type = "LogRoller.RollingFileLogger"
73+
topmodule = "MyModule"
74+
...
75+
```
6476
6577
## Examples
6678

src/connectors.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ function logcompose(::Type{Logging.ConsoleLogger}, config::Dict{String,Any}, log
4040

4141
displaysize = get(logger_config, "displaysize", nothing)
4242
if displaysize !== nothing
43-
if !(displaysize isa AbstractVector{Int}) || length(displaysize) != 2
43+
if !(displaysize isa AbstractVector) || length(displaysize) != 2
4444
error("Expected [height,width] but got displaysize=$displaysize")
4545
end
46-
stream = IOContext(stream, :displaysize=>Tuple(displaysize))
46+
stream = IOContext(stream, :displaysize=>Tuple(convert(Vector{Int},displaysize)))
4747
end
4848

4949
show_limited = get(logger_config, "show_limited", true)

0 commit comments

Comments
 (0)