-
Notifications
You must be signed in to change notification settings - Fork 61
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
Line number in structure limits but not in hba? #355
Comments
I think it would be good to have line numbers for all configuration files |
Agree. |
👍 |
fluca1978
added a commit
to fluca1978/pgagroal
that referenced
this issue
Mar 27, 2023
Adds a `lineno` field to the configuration structs: - `struct hba` - `struct configuration` Thanks to this, it is possible to provide better messages to the users about misconfigurations. For example, if the user mispells an entry into the HBA file: ``` FATAL configuration.c:1162 Unknown HBA type: HOSTSS (/etc/pgagroal/pgagroal_hba.conf:7) ```
fluca1978
added a commit
to fluca1978/pgagroal
that referenced
this issue
Mar 27, 2023
Added a `lineno` field into structures `struct hba` and `struct server`. This simplifies error reporting, since it is now possible to drive the user to the line number that is causing a problem. Changes to a few log/warn messages to become more easy to read. Close agroal#355
fluca1978
added a commit
to fluca1978/pgagroal
that referenced
this issue
Mar 27, 2023
Added a `lineno` field into structures `struct hba` and `struct server`. This simplifies error reporting, since it is now possible to drive the user to the line number that is causing a problem. Thanks to this, it is possible to provide better messages to the users about misconfigurations. For example, if the user mispells an entry into the HBA file: ``` FATAL configuration.c:1162 Unknown HBA type: HOSTSS (/etc/pgagroal/pgagroal_hba.conf:7) ``` Changes to a few log/warn messages to become more easy to read. Close agroal#355
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While working on #239, I noted that the
struct limit
has a line number field https://github.com/agroal/pgagroal/blob/master/src/include/pgagroal.h#L291 while other similar structures, most notablystruct hba
does not.The line number is useful to report back errors in the configuration, e.g., https://github.com/agroal/pgagroal/blob/master/src/libpgagroal/configuration.c#L1303.
In order to keep everything consistent, I would like to either remove the line number or to add it in similar structures, at leas in
struct hba
.The text was updated successfully, but these errors were encountered: