Skip to content

update CI, move to github actions, update README #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
environment:
matrix:
- julia_version: 1.0
- julia_version: 1.1
- julia_version: 1.2
- julia_version: 1.3
- julia_version: 1.4
- julia_version: 1
- julia_version: nightly

platform:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
jobs:
TagBot:
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI
on:
push:
branches: [master]
tags: ["*"]
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.0'
- '1' # automatically expands to the latest stable 1.x release of Julia
- nightly
os:
- ubuntu-latest
arch:
- x64
- x86
include:
# test macOS and Windows with latest Julia only
- os: macOS-latest
arch: x64
version: 1
- os: windows-latest
arch: x64
version: 1
- os: windows-latest
arch: x86
version: 1
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# LogCompose

[![Build Status](https://travis-ci.org/tanmaykm/LogCompose.jl.png)](https://travis-ci.org/tanmaykm/LogCompose.jl)
[![Build Status](https://github.com/tanmaykm/LogCompose.jl/workflows/CI/badge.svg)](https://github.com/tanmaykm/LogCompose.jl/actions?query=workflow%3ACI+branch%3Amaster)
[![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)
[![Coverage Status](https://coveralls.io/repos/github/tanmaykm/LogCompose.jl/badge.svg?branch=master)](https://coveralls.io/github/tanmaykm/LogCompose.jl?branch=master)
[![codecov.io](http://codecov.io/github/tanmaykm/LogCompose.jl/coverage.svg?branch=master)](http://codecov.io/github/tanmaykm/LogCompose.jl?branch=master)

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

Expand Down Expand Up @@ -61,6 +61,18 @@ There are external packages that provide support for a few other types of logger
- LogRoller: [LogRollerCompose.jl](https://github.com/tanmaykm/LogRollerCompose.jl)
- SyslogLogging: [SyslogLoggingCompose.jl](https://github.com/tanmaykm/SyslogLoggingCompose.jl)

For loggers supplied by external packages, LogCompose looks for the logger implementation type
(the one mentioned in `type` configuration attribute) in the `Main` module by default. But if
your code imports the external loggers within your module instead of the Main module, then the
module name where the logger type can be found must be specified in the (otherwise optional)
`topmodule` configuration parameter. E.g.:

```
[loggers.rollinglog]
type = "LogRoller.RollingFileLogger"
topmodule = "MyModule"
...
```

## Examples

Expand Down
4 changes: 2 additions & 2 deletions src/connectors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ function logcompose(::Type{Logging.ConsoleLogger}, config::Dict{String,Any}, log

displaysize = get(logger_config, "displaysize", nothing)
if displaysize !== nothing
if !(displaysize isa AbstractVector{Int}) || length(displaysize) != 2
if !(displaysize isa AbstractVector) || length(displaysize) != 2
error("Expected [height,width] but got displaysize=$displaysize")
end
stream = IOContext(stream, :displaysize=>Tuple(displaysize))
stream = IOContext(stream, :displaysize=>Tuple(convert(Vector{Int},displaysize)))
end

show_limited = get(logger_config, "show_limited", true)
Expand Down