Skip to content

Commit

Permalink
Merge pull request #7 from tanmaykm/tan/misc
Browse files Browse the repository at this point in the history
update CI, move to github actions, update README
  • Loading branch information
tanmaykm authored Feb 4, 2021
2 parents 8a0d3d2 + 5d07012 commit eca2c39
Showing 6 changed files with 83 additions and 34 deletions.
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:
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.

@@ -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
4 changes: 2 additions & 2 deletions src/connectors.jl
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit eca2c39

Please # to comment.