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

Support logging raw template value in log APIs #3331

Open
daneshk opened this issue Sep 11, 2022 · 9 comments · May be fixed by ballerina-platform/module-ballerina-log#1157
Open

Support logging raw template value in log APIs #3331

daneshk opened this issue Sep 11, 2022 · 9 comments · May be fixed by ballerina-platform/module-ballerina-log#1157
Assignees
Labels
Credits/30 good first issue Good for newcomers Hacktoberfest module/log Team/DIU Data, IO, and Util packages related issues Type/Improvement

Comments

@daneshk
Copy link
Member

daneshk commented Sep 11, 2022

Description:
Need similar support in io:println

@daneshk daneshk added Type/Improvement module/log Team/DIU Data, IO, and Util packages related issues labels Sep 11, 2022
@daneshk daneshk added the good first issue Good for newcomers label Sep 20, 2023
@codingmickey
Copy link

Hey @daneshk! I would like work on this, but the issue isn't very clear from the description :(

@daneshk
Copy link
Member Author

daneshk commented Oct 26, 2023

Thanks @codingmickey for your interest and sorry for the delay in responding. Please find the description about the issue below,

Problem

The io:println function supports passing raw template as value like below example,

public function main() returns error? {
    string input = "Hello, World!";
    io:println(`input value: ${input}`);
}

where we can pass the template value with variables, and it extracts the value from the variable and prints. Here the output is, input value: Hello, World!

This support is not available in the log functions, it only supports passing string literals.

Expectation

In this issue, we are expecting to support the same behaviour in all log functions as well. So user can pass the template value like below,

public function main() returns error? {
    string input = "Hello, World!";
    log:printInfo(`input value: ${input}`);
}

Resources

Please let me know, if you need more help and details

@neelshah2409
Copy link

I would like to work on this issue

@daneshk
Copy link
Member Author

daneshk commented Nov 2, 2023

@codingmickey Can you update the current status for this issue, please? when can we expect the fix, etc?

@Aviral0702
Copy link

@keizer619 I would like to work on this issue.

@keizer619
Copy link
Member

Hi @Aviral0702

You can work on this issue.

To help you get started, here are some essential resources:

  1. Understanding Ballerina Platform:
    Learn what Ballerina is all about Ballerina Platform
  2. How to Contribute:
    Read our contributing guidelines to understand how you can contribute effectively: Contribution Guide
  3. Contributing to the Ballerina Library:
    If you're interested in contributing to our library, here are the guidelines: Library Contribution Guide
  4. Learn Ballerina:
    If you're new to Ballerina or want to enhance your skills, our official website offers a wealth of learning resources: Learn Ballerina
  5. Get Help and Connect:
    Ask technical questions on Stack Overflow with Ballerina tag and join our Discord community Ballerina Discord

@keizer619
Copy link
Member

@Aviral0702 Are you working on this?

@randilt
Copy link

randilt commented Jan 14, 2025

Hi, I would like to work on this issue.

@randilt
Copy link

randilt commented Jan 14, 2025

Submitted a PR, can you please check @daneshk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Credits/30 good first issue Good for newcomers Hacktoberfest module/log Team/DIU Data, IO, and Util packages related issues Type/Improvement
Projects
Status: Todo
Status: Todo
Development

Successfully merging a pull request may close this issue.

8 participants