fix audit log prefix for public dashboards (#53070)
This commit is contained in:
@@ -21,6 +21,8 @@ type PublicDashboardStoreImpl struct {
|
||||
dialect migrator.Dialect
|
||||
}
|
||||
|
||||
var LogPrefix = "publicdashboards.store"
|
||||
|
||||
// Gives us a compile time error if our database does not adhere to contract of
|
||||
// the interface
|
||||
var _ publicdashboards.Store = (*PublicDashboardStoreImpl)(nil)
|
||||
@@ -29,7 +31,7 @@ var _ publicdashboards.Store = (*PublicDashboardStoreImpl)(nil)
|
||||
func ProvideStore(sqlStore *sqlstore.SQLStore) *PublicDashboardStoreImpl {
|
||||
return &PublicDashboardStoreImpl{
|
||||
sqlStore: sqlStore,
|
||||
log: log.New("publicdashboards.store"),
|
||||
log: log.New(LogPrefix),
|
||||
dialect: sqlStore.Dialect,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@ var DefaultTimeSettings, _ = simplejson.NewJson([]byte(`{}`))
|
||||
// Default time to pass in with seconds rounded
|
||||
var DefaultTime = time.Now().UTC().Round(time.Second)
|
||||
|
||||
func TestLogPrefix(t *testing.T) {
|
||||
assert.Equal(t, LogPrefix, "publicdashboards.store")
|
||||
}
|
||||
|
||||
func TestIntegrationGetDashboard(t *testing.T) {
|
||||
var sqlStore *sqlstore.SQLStore
|
||||
var dashboardStore *dashboardsDB.DashboardStore
|
||||
|
||||
Reference in New Issue
Block a user