Skip to content
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

make the lib multi-platform #21

Closed
oshai opened this issue May 19, 2017 · 23 comments
Closed

make the lib multi-platform #21

oshai opened this issue May 19, 2017 · 23 comments

Comments

@oshai
Copy link
Owner

oshai commented May 19, 2017

No description provided.

@LDVSOFT
Copy link

LDVSOFT commented Aug 15, 2017

I would really like this awesome library supporting multiplatform code. There is already attempt using mu.kotlin-logging here: https://github.com/shafirov/klogging, but it does not provide API to be used in multiplatform code.

@oshai
Copy link
Owner Author

oshai commented Aug 15, 2017

Do you have an idea or link how to do that? I am not sure what is the level of support in kotlin for such libs.

@LDVSOFT
Copy link

LDVSOFT commented Aug 15, 2017

I referenced only ideas. There is a discussion on supporting the multi-platform projects.

@oshai
Copy link
Owner Author

oshai commented Aug 16, 2017

Thanks for the links, seems like not that stable at the moment... So I am still waiting for JB to announce of something official.

@LDVSOFT
Copy link

LDVSOFT commented Aug 16, 2017

Yeah, official support would be really nice. Thank you for all your effort!

@oshai
Copy link
Owner Author

oshai commented Aug 16, 2017 via email

@oshai
Copy link
Owner Author

oshai commented Sep 29, 2017

It will be possible in 1.2: http://kotlinlang.org/docs/reference/multiplatform.html

@Lewik
Copy link

Lewik commented Dec 28, 2017

https://github.com/Lewik/klogging can jvm, js and common logging.

oshai pushed a commit that referenced this issue Dec 29, 2017
- split to common/jvm/js
- left all code in jvm at the moment
- add build scripts
@oshai
Copy link
Owner Author

oshai commented Jan 17, 2018

changes for this issue are on the multiplatform branch: https://github.com/MicroUtils/kotlin-logging/tree/multiplatform

@oshai
Copy link
Owner Author

oshai commented Jan 20, 2018

release 1.5.3 is from multiplatform branch, currently only jvm version but you are welcome to try.

oshai added a commit that referenced this issue Jan 24, 2018
* issue #21 - make the lib multiplatform
- split to common/jvm/js
- left all code in jvm at the moment
- add build scripts

* issue #31 - Add MDC support: withLoggingContext

* merge to branch: issue #31 - Add MDC support: withLoggingContext

* add documentation

* rebase (#33)

* issue #31 - Add MDC support: withLoggingContext

* Update ChangleLog.md

* Update ChangleLog.md

* Update README.md

* Rename ChangleLog.md to ChangeLog.md (#32)

* update to kotlin 1.2.20

* split packages and gradle build

* split packages and gradle build

* split packages and gradle build

* fix src root for jvm project

* fix artifact build for jvm version
@oshai
Copy link
Owner Author

oshai commented Feb 13, 2018

All work was merged to master. There is no js artifact yet but repo is ready for that.

@joelhandwell
Copy link

@oshai Is this also applicable for Kotlin/Native multi platform projects?

@oshai
Copy link
Owner Author

oshai commented Jul 27, 2018

No, currently this issue is only related to jvm/js. But it is true that in the future we should have native flavour as well.

@Lewik
Copy link

Lewik commented Jul 28, 2018

@joelhandwell if it not difficult, I'll try to implement it in https://github.com/Lewik/klogging I'll notify you about it.

oshai added a commit that referenced this issue Jul 28, 2018
add common and js jars (will be in https://github.com/MicroUtils/kotlin-logging/releases)
common module have expect for 2 main classes: KotlinLogging, KLogger
js implementation includes writing to console,
and a class KotlinLoggingLevel that defines the log level in LOG_LEVEL member
default level is info for js implementation
@oshai
Copy link
Owner Author

oshai commented Jul 28, 2018

@LDVSOFT @Lewik - if you can test common + js from here: https://github.com/MicroUtils/kotlin-logging/releases/tag/1.5.5 it will be great. Also, any comments on the implementation are welcome.

@oshai
Copy link
Owner Author

oshai commented Jul 28, 2018

I also published common and js artifacts to bintray/jcenter. feedback is welcome.

@anidotnet
Copy link

anidotnet commented Jul 29, 2018

Currently maven/gradle build is failing for kotlin/jvm project as it is not able to find the common module.

 > Could not find io.github.microutils:kotlin-logging-common:1.5.5.
     Searched in the following locations:
         file:/home/anindya/.m2/repository/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.pom
         file:/home/anindya/.m2/repository/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.jar
         https://repo.maven.apache.org/maven2/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.pom
         https://repo.maven.apache.org/maven2/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.jar
         https://oss.sonatype.org/content/repositories/snapshots/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.pom
         https://oss.sonatype.org/content/repositories/snapshots/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.jar

Do you have any plan to publish the common artifact to central maven repo? For the time being I have added jcenter() to the build repository of my gradle script.

@oshai
Copy link
Owner Author

oshai commented Jul 29, 2018

I was hoping I will not have to, it will break usage for existing users trying to upgrade.
I will try to define source-sets to overcome this issue.

@oshai
Copy link
Owner Author

oshai commented Jul 29, 2018

@anidotnet - thanks for reporting. seems something was changed between Kotlin versions 1.2.30->1.2.40 in pom generation. I will try to ask around.
In the meanwhile, I created version 1.5.6 that should be ok. It will be great if you can verify that.

@oshai
Copy link
Owner Author

oshai commented Jul 29, 2018

opened an issue for it: https://youtrack.jetbrains.com/issue/KT-25799

@anidotnet
Copy link

anidotnet commented Jul 30, 2018

@oshai I still could not see the new version 1.5.6 in central maven repo.
EDIT: I can see it now and it compiles without any issues. Thanks 👍

@oshai
Copy link
Owner Author

oshai commented Aug 5, 2018

Please vote for this issue, as it prevents us from upgrading kotlin version: https://youtrack.jetbrains.com/issue/KT-25799

darioseidl pushed a commit to darioseidl/kotlin-logging that referenced this issue Aug 6, 2018
add common and js jars (will be in https://github.com/MicroUtils/kotlin-logging/releases)
common module have expect for 2 main classes: KotlinLogging, KLogger
js implementation includes writing to console,
and a class KotlinLoggingLevel that defines the log level in LOG_LEVEL member
default level is info for js implementation
@oshai
Copy link
Owner Author

oshai commented Aug 7, 2018

I published version 1.5.9 to maven central which I hope will solve the issue with missing artifacts. There is still a broken build in Travis that I am handling because of js tests issue. If you see any other errors please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants